Changed version to 2.0.0. Added configurable setting for mobs to not target a protected player.

This commit is contained in:
2021-09-28 22:02:03 +01:00
parent 7d15055d43
commit 593af0a591
5 changed files with 31 additions and 2 deletions

View File

@ -17,6 +17,8 @@ public class Config {
public static ForgeConfigSpec.BooleanValue POST_FIRE_ENABLED;
public static ForgeConfigSpec.IntValue POST_FIRE_DURATION;
public static ForgeConfigSpec.BooleanValue MAIN_PLAYER_TARGET_ENABLED;
public static void init() {
initServer();
@ -26,6 +28,12 @@ public class Config {
private static void initServer() {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
builder.comment("Main protection settings for protecting inactive (loading) players.").push("main");
MAIN_PLAYER_TARGET_ENABLED = builder
.comment("Whether mobs will still target/attack a protected player.")
.define("playerTargetEnabled", true);
builder.pop();
builder.comment("Additional protection settings that apply as soon as a player becomes active.").push("post");
builder.push("grace_period");
POST_GRACE_ENABLED = builder