diff --git a/Changelog.txt b/Changelog.txt index 7e2ddfa07..f7bb86aeb 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -65,6 +65,10 @@ Version 2.2.0 Hardcore config options will now be found in "hardcore.conf" + Super Ability conifg options will now be found in "skill_super_abilities.conf" + Super Abilities now have a default max length cap of one minute + Blast Mining default cooldown increased from 60 seconds to 120 seconds + Exploit related config options will now be found in "exploit-prevention" Exploit Prevention's "EndermanEndermiteFarms" renamed -> "Endermen-Endermite-Fix" Added toggle for pistons marking natural blocks as unnatural after being moved to prevent afk stone farms diff --git a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityCooldowns.java b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityCooldowns.java new file mode 100644 index 000000000..9af509169 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityCooldowns.java @@ -0,0 +1,64 @@ +package com.gmail.nossr50.config.hocon.superabilities; + +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +@ConfigSerializable +public class ConfigSectionSuperAbilityCooldowns { + + @Setting(value = "Berserk") + private int berserk = 240; + + @Setting(value = "Giga-Drill-Breaker") + private int gigaDrillBreaker = 240; + + @Setting(value = "Green-Terra") + private int greenTerra = 240; + + @Setting(value = "Serrated-Strikes") + private int serratedStrikes = 240; + + @Setting(value = "Skull-Splitter") + private int skullSplitter = 240; + + @Setting(value = "Super-Breaker") + private int superBreaker = 240; + + @Setting(value = "Tree-Feller") + private int treeFeller = 240; + + @Setting(value = "Blast-Mining") + private int blastMining = 120; + + public int getBerserk() { + return berserk; + } + + public int getGigaDrillBreaker() { + return gigaDrillBreaker; + } + + public int getGreenTerra() { + return greenTerra; + } + + public int getSerratedStrikes() { + return serratedStrikes; + } + + public int getSkullSplitter() { + return skullSplitter; + } + + public int getSuperBreaker() { + return superBreaker; + } + + public int getTreeFeller() { + return treeFeller; + } + + public int getBlastMining() { + return blastMining; + } +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityLimits.java b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityLimits.java new file mode 100644 index 000000000..9e1cb9b10 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityLimits.java @@ -0,0 +1,16 @@ +package com.gmail.nossr50.config.hocon.superabilities; + +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +@ConfigSerializable +public class ConfigSectionSuperAbilityLimits { + public static final int TOOL_DURABILITY_DAMAGE_DEFAULT = 1; + @Setting(value = "Tree-Feller", comment = "Options for Tree Feller") + private ConfigSectionTreeFeller treeFeller = new ConfigSectionTreeFeller(); + + @Setting(value = "Tool-Durability-Damage", comment = "Increase this number to cause more durability loss for tools when using super abilities." + + "\nDefault value: "+TOOL_DURABILITY_DAMAGE_DEFAULT) + private int toolDurabilityDamage = TOOL_DURABILITY_DAMAGE_DEFAULT; + +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityMaxLength.java b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityMaxLength.java new file mode 100644 index 000000000..a76454081 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionSuperAbilityMaxLength.java @@ -0,0 +1,54 @@ +package com.gmail.nossr50.config.hocon.superabilities; + +import ninja.leaping.configurate.objectmapping.Setting; + +public class ConfigSectionSuperAbilityMaxLength { + @Setting(value = "Berserk") + private int berserk = 60; + + @Setting(value = "Giga-Drill-Breaker") + private int gigaDrillBreaker = 60; + + @Setting(value = "Green-Terra") + private int greenTerra = 60; + + @Setting(value = "Serrated-Strikes") + private int serratedStrikes = 60; + + @Setting(value = "Skull-Splitter") + private int skullSplitter = 60; + + @Setting(value = "Super-Breaker") + private int superBreaker = 60; + + @Setting(value = "Tree-Feller") + private int treeFeller = 60; + + public int getBerserk() { + return berserk; + } + + public int getGigaDrillBreaker() { + return gigaDrillBreaker; + } + + public int getGreenTerra() { + return greenTerra; + } + + public int getSerratedStrikes() { + return serratedStrikes; + } + + public int getSkullSplitter() { + return skullSplitter; + } + + public int getSuperBreaker() { + return superBreaker; + } + + public int getTreeFeller() { + return treeFeller; + } +} diff --git a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionTreeFeller.java b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionTreeFeller.java new file mode 100644 index 000000000..d79e5a49c --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSectionTreeFeller.java @@ -0,0 +1,15 @@ +package com.gmail.nossr50.config.hocon.superabilities; + +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +@ConfigSerializable +public class ConfigSectionTreeFeller { + + public static final int TREE_FELLER_LIMIT_DEFAULT = 500; + + @Setting(value = "Tree-Size-Limit", comment = "Trees over this many blocks in size will not activate" + + "\nLower this number to improve performance." + + "\nDefault value: "+TREE_FELLER_LIMIT_DEFAULT) + private int treeFellerLimit = TREE_FELLER_LIMIT_DEFAULT; +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSuperAbilities.java b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSuperAbilities.java index 098bd6af4..743ec0d5c 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSuperAbilities.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/superabilities/ConfigSuperAbilities.java @@ -1,8 +1,33 @@ package com.gmail.nossr50.config.hocon.superabilities; +import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @ConfigSerializable public class ConfigSuperAbilities { + public static final boolean SUPER_ABILITY_DEFAULT = true; + public static final boolean MUST_SNEAK_TO_ACTIVATE_DEFAULT = false; + + @Setting(value = "Enable-Super-Abilities", + comment = "Turn this off to disable all super abilities." + + "\nDefault value: "+SUPER_ABILITY_DEFAULT) + private boolean superAbilitiesEnabled = SUPER_ABILITY_DEFAULT; + + @Setting(value = "Require-Sneaking", + comment = "Players must be sneaking in order to activate super abilities." + + "\nDefault value: "+MUST_SNEAK_TO_ACTIVATE_DEFAULT) + private boolean mustSneakToActivate = MUST_SNEAK_TO_ACTIVATE_DEFAULT; + + @Setting(value = "Super-Ability-Cooldowns", + comment = "How many seconds players must wait before they can use a super ability again.") + private ConfigSectionSuperAbilityCooldowns superAbilityCooldowns = new ConfigSectionSuperAbilityCooldowns(); + + @Setting(value = "Super-Ability-Max-Length", + comment = "The maximum amount of time a player can use a super ability." + + "\nMost super abilities get longer as a player grows in skill.") + private ConfigSectionSuperAbilityMaxLength superAbilityMaxLength = new ConfigSectionSuperAbilityMaxLength(); + + @Setting(value = "Super-Ability-Settings", comment = "Change specific parameters for super abilities.") + private ConfigSectionSuperAbilityLimits superAbilityLimits = new ConfigSectionSuperAbilityLimits(); } diff --git a/src/main/resources/advanced.yml b/src/main/resources/advanced.yml index 5a2e7f845..56335cca8 100644 --- a/src/main/resources/advanced.yml +++ b/src/main/resources/advanced.yml @@ -13,8 +13,6 @@ # Settings for the Skills ### # Enables anonymous statistics -Metrics: - bstats: true Feedback: SkillCommand: BlankLinesAboveHeader: true @@ -75,7 +73,6 @@ Feedback: SendCopyOfMessageToChat: true Skills: General: - StartingLevel: 1 Ability: Length: Standard: