Bläddra i källkod

Spears (wip pt 1)

nossr50 2 veckor sedan
förälder
incheckning
1b28ad8f59
30 ändrade filer med 339 tillägg och 147 borttagningar
  1. 5 0
      Changelog.txt
  2. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java
  3. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/AlchemyCommand.java
  4. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java
  5. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java
  6. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java
  7. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/ExcavationCommand.java
  8. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java
  9. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java
  10. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/MacesCommand.java
  11. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java
  12. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java
  13. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/SalvageCommand.java
  14. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/SmeltingCommand.java
  15. 52 0
      src/main/java/com/gmail/nossr50/commands/skills/SpearsCommand.java
  16. 3 9
      src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java
  17. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java
  18. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java
  19. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java
  20. 1 1
      src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java
  21. 0 4
      src/main/java/com/gmail/nossr50/config/GeneralConfig.java
  22. 1 0
      src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java
  23. 3 0
      src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java
  24. 9 2
      src/main/java/com/gmail/nossr50/datatypes/skills/SuperAbilityType.java
  25. 11 0
      src/main/java/com/gmail/nossr50/skills/spears/SpearsManager.java
  26. 2 0
      src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java
  27. 15 3
      src/main/java/com/gmail/nossr50/util/skills/SkillTools.java
  28. 18 0
      src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java
  29. 179 112
      src/main/resources/plugin.yml
  30. 24 0
      src/main/resources/skillranks.yml

+ 5 - 0
Changelog.txt

@@ -1,3 +1,8 @@
+Version 2.2.046
+    Added Spears combat skill
+    Added permissions related to Spears
+    Added /spears skill command
+
 Version 2.2.045
 Version 2.2.045
     Green Thumb now replants some crops it was failing to replant before (see notes)
     Green Thumb now replants some crops it was failing to replant before (see notes)
     Green Thumb now replants harvested plants faster
     Green Thumb now replants harvested plants faster

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java

@@ -73,7 +73,7 @@ public class AcrobaticsCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.ACROBATICS);
                 PrimarySkillType.ACROBATICS);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/AlchemyCommand.java

@@ -92,7 +92,7 @@ public class AlchemyCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.ALCHEMY);
                 PrimarySkillType.ALCHEMY);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java

@@ -93,7 +93,7 @@ public class ArcheryCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.ARCHERY);
                 PrimarySkillType.ARCHERY);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java

@@ -119,7 +119,7 @@ public class AxesCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         final List<Component> textComponents = new ArrayList<>();
         final List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.AXES);
                 PrimarySkillType.AXES);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java

@@ -68,7 +68,7 @@ public class CrossbowsCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.CROSSBOWS);
                 PrimarySkillType.CROSSBOWS);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/ExcavationCommand.java

@@ -71,7 +71,7 @@ public class ExcavationCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.EXCAVATION);
                 PrimarySkillType.EXCAVATION);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java

@@ -185,7 +185,7 @@ public class FishingCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.FISHING);
                 PrimarySkillType.FISHING);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java

@@ -187,7 +187,7 @@ public class HerbalismCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.HERBALISM);
                 PrimarySkillType.HERBALISM);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/MacesCommand.java

@@ -77,7 +77,7 @@ public class MacesCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.MACES);
                 PrimarySkillType.MACES);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java

@@ -144,7 +144,7 @@ public class MiningCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.MINING);
                 PrimarySkillType.MINING);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java

@@ -134,7 +134,7 @@ public class RepairCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.REPAIR);
                 PrimarySkillType.REPAIR);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/SalvageCommand.java

@@ -72,7 +72,7 @@ public class SalvageCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.SALVAGE);
                 PrimarySkillType.SALVAGE);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/SmeltingCommand.java

@@ -97,7 +97,7 @@ public class SmeltingCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.SMELTING);
                 PrimarySkillType.SMELTING);
 
 
         return textComponents;
         return textComponents;

+ 52 - 0
src/main/java/com/gmail/nossr50/commands/skills/SpearsCommand.java

@@ -0,0 +1,52 @@
+package com.gmail.nossr50.commands.skills;
+
+
+import static com.gmail.nossr50.datatypes.skills.SubSkillType.SPEARS_SPEARS_LIMIT_BREAK;
+import static com.gmail.nossr50.util.text.TextComponentFactory.appendSubSkillTextComponents;
+
+import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
+import com.gmail.nossr50.util.skills.CombatUtils;
+import com.gmail.nossr50.util.skills.SkillUtils;
+import java.util.ArrayList;
+import java.util.List;
+import net.kyori.adventure.text.Component;
+import org.bukkit.entity.Player;
+
+public class SpearsCommand extends SkillCommand {
+
+
+    public SpearsCommand() {
+        super(PrimarySkillType.SPEARS);
+    }
+
+    @Override
+    protected void dataCalculations(Player player, float skillValue) {
+    }
+
+    @Override
+    protected void permissionsCheck(Player player) {
+    }
+
+    @Override
+    protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance,
+            boolean isLucky) {
+        List<String> messages = new ArrayList<>();
+
+        if (SkillUtils.canUseSubskill(player, SPEARS_SPEARS_LIMIT_BREAK)) {
+            messages.add(getStatMessage(SPEARS_SPEARS_LIMIT_BREAK,
+                    String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player,
+                            SPEARS_SPEARS_LIMIT_BREAK, 1000))));
+        }
+
+        return messages;
+    }
+
+    @Override
+    protected List<Component> getTextComponents(Player player) {
+        List<Component> textComponents = new ArrayList<>();
+
+        appendSubSkillTextComponents(player, textComponents, PrimarySkillType.SPEARS);
+
+        return textComponents;
+    }
+}

+ 3 - 9
src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java

@@ -22,8 +22,8 @@ public class SwordsCommand extends SkillCommand {
     private String serratedStrikesLengthEndurance;
     private String serratedStrikesLengthEndurance;
 
 
     private String rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs,
     private String rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs,
-            ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs,
-            ruptureLengthSecondsAgainstPlayers, ruptureLengthSecondsAgainstMobs, ruptureChanceToApply, ruptureChanceToApplyLucky;
+            ruptureLengthSecondsAgainstPlayers, ruptureLengthSecondsAgainstMobs,
+            ruptureChanceToApply, ruptureChanceToApplyLucky;
 
 
     private boolean canCounter;
     private boolean canCounter;
     private boolean canSerratedStrike;
     private boolean canSerratedStrike;
@@ -56,11 +56,6 @@ public class SwordsCommand extends SkillCommand {
             rupturePureTickDamageAgainstMobs = String.valueOf(
             rupturePureTickDamageAgainstMobs = String.valueOf(
                     mcMMO.p.getAdvancedConfig().getRuptureTickDamage(false, ruptureRank));
                     mcMMO.p.getAdvancedConfig().getRuptureTickDamage(false, ruptureRank));
 
 
-            ruptureExplosionDamageAgainstPlayers = String.valueOf(
-                    mcMMO.p.getAdvancedConfig().getRuptureExplosionDamage(true, ruptureRank));
-            ruptureExplosionDamageAgainstMobs = String.valueOf(
-                    mcMMO.p.getAdvancedConfig().getRuptureExplosionDamage(false, ruptureRank));
-
             ruptureChanceToApply =
             ruptureChanceToApply =
                     mcMMO.p.getAdvancedConfig().getRuptureChanceToApplyOnHit(ruptureRank) + "%";
                     mcMMO.p.getAdvancedConfig().getRuptureChanceToApplyOnHit(ruptureRank) + "%";
             ruptureChanceToApplyLucky = String.valueOf(
             ruptureChanceToApplyLucky = String.valueOf(
@@ -105,7 +100,6 @@ public class SwordsCommand extends SkillCommand {
 
 
             messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.TickDamage",
             messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.TickDamage",
                     rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs));
                     rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs));
-//            messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.ExplosionDamage", ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs));
 
 
             messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note.Update.One"));
             messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note.Update.One"));
         }
         }
@@ -134,7 +128,7 @@ public class SwordsCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.SWORDS);
                 PrimarySkillType.SWORDS);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java

@@ -115,7 +115,7 @@ public class TamingCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents, this.skill);
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents, this.skill);
 
 
         return textComponents;
         return textComponents;
     }
     }

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java

@@ -50,7 +50,7 @@ public class TridentsCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.TRIDENTS);
                 PrimarySkillType.TRIDENTS);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java

@@ -136,7 +136,7 @@ public class UnarmedCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.UNARMED);
                 PrimarySkillType.UNARMED);
 
 
         return textComponents;
         return textComponents;

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java

@@ -123,7 +123,7 @@ public class WoodcuttingCommand extends SkillCommand {
     protected List<Component> getTextComponents(Player player) {
     protected List<Component> getTextComponents(Player player) {
         List<Component> textComponents = new ArrayList<>();
         List<Component> textComponents = new ArrayList<>();
 
 
-        TextComponentFactory.getSubSkillTextComponents(player, textComponents,
+        TextComponentFactory.appendSubSkillTextComponents(player, textComponents,
                 PrimarySkillType.WOODCUTTING);
                 PrimarySkillType.WOODCUTTING);
 
 
         return textComponents;
         return textComponents;

+ 0 - 4
src/main/java/com/gmail/nossr50/config/GeneralConfig.java

@@ -424,10 +424,6 @@ public class GeneralConfig extends BukkitConfig {
         return config.getBoolean("MySQL.Server.SSL", true);
         return config.getBoolean("MySQL.Server.SSL", true);
     }
     }
 
 
-    public boolean getMySQLDebug() {
-        return config.getBoolean("MySQL.Debug", false);
-    }
-
     public boolean getMySQLPublicKeyRetrieval() {
     public boolean getMySQLPublicKeyRetrieval() {
         return config.getBoolean("MySQL.Server.allowPublicKeyRetrieval", true);
         return config.getBoolean("MySQL.Server.allowPublicKeyRetrieval", true);
     }
     }

+ 1 - 0
src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java

@@ -24,6 +24,7 @@ public enum PrimarySkillType {
     REPAIR,
     REPAIR,
     SALVAGE,
     SALVAGE,
     SMELTING,
     SMELTING,
+    SPEARS,
     SWORDS,
     SWORDS,
     TAMING,
     TAMING,
     TRIDENTS,
     TRIDENTS,

+ 3 - 0
src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java

@@ -83,6 +83,9 @@ public enum SubSkillType {
     SMELTING_SECOND_SMELT,
     SMELTING_SECOND_SMELT,
     SMELTING_UNDERSTANDING_THE_ART(8),
     SMELTING_UNDERSTANDING_THE_ART(8),
 
 
+    /* Spears */
+    SPEARS_SPEARS_LIMIT_BREAK(10),
+
     /* Swords */
     /* Swords */
     SWORDS_COUNTER_ATTACK(1),
     SWORDS_COUNTER_ATTACK(1),
     SWORDS_RUPTURE(4),
     SWORDS_RUPTURE(4),

+ 9 - 2
src/main/java/com/gmail/nossr50/datatypes/skills/SuperAbilityType.java

@@ -93,6 +93,13 @@ public enum SuperAbilityType {
             "Placeholder",
             "Placeholder",
             "Placeholder",
             "Placeholder",
             "Placeholder"),
             "Placeholder"),
+    SPEARS_SUPER_ABILITY(
+            "Placeholder",
+            "Placeholder",
+            "Placeholder",
+            "Placeholder",
+            "Placeholder",
+            "Placeholder"),
 
 
     /**
     /**
      * Has cooldown - but has to share a skill with Super Breaker, so needs special treatment
      * Has cooldown - but has to share a skill with Super Breaker, so needs special treatment
@@ -216,8 +223,8 @@ public enum SuperAbilityType {
             case SUPER_BREAKER -> Permissions.superBreaker(player);
             case SUPER_BREAKER -> Permissions.superBreaker(player);
             case TREE_FELLER -> Permissions.treeFeller(player);
             case TREE_FELLER -> Permissions.treeFeller(player);
             // TODO: once implemented, return permissions for the following abilities
             // TODO: once implemented, return permissions for the following abilities
-            case EXPLOSIVE_SHOT, TRIDENTS_SUPER_ABILITY, SUPER_SHOTGUN, MACES_SUPER_ABILITY ->
-                    false;
+            case EXPLOSIVE_SHOT, TRIDENTS_SUPER_ABILITY, SUPER_SHOTGUN, MACES_SUPER_ABILITY,
+                 SPEARS_SUPER_ABILITY -> false;
         };
         };
     }
     }
 
 

+ 11 - 0
src/main/java/com/gmail/nossr50/skills/spears/SpearsManager.java

@@ -0,0 +1,11 @@
+package com.gmail.nossr50.skills.spears;
+
+import com.gmail.nossr50.datatypes.player.McMMOPlayer;
+import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
+import com.gmail.nossr50.skills.SkillManager;
+
+public class SpearsManager extends SkillManager {
+    public SpearsManager(McMMOPlayer mmoPlayer) {
+        super(mmoPlayer, PrimarySkillType.SPEARS);
+    }
+}

+ 2 - 0
src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java

@@ -41,6 +41,7 @@ import com.gmail.nossr50.commands.skills.MmoInfoCommand;
 import com.gmail.nossr50.commands.skills.RepairCommand;
 import com.gmail.nossr50.commands.skills.RepairCommand;
 import com.gmail.nossr50.commands.skills.SalvageCommand;
 import com.gmail.nossr50.commands.skills.SalvageCommand;
 import com.gmail.nossr50.commands.skills.SmeltingCommand;
 import com.gmail.nossr50.commands.skills.SmeltingCommand;
+import com.gmail.nossr50.commands.skills.SpearsCommand;
 import com.gmail.nossr50.commands.skills.SwordsCommand;
 import com.gmail.nossr50.commands.skills.SwordsCommand;
 import com.gmail.nossr50.commands.skills.TamingCommand;
 import com.gmail.nossr50.commands.skills.TamingCommand;
 import com.gmail.nossr50.commands.skills.TridentsCommand;
 import com.gmail.nossr50.commands.skills.TridentsCommand;
@@ -101,6 +102,7 @@ public final class CommandRegistrationManager {
                 case REPAIR -> command.setExecutor(new RepairCommand());
                 case REPAIR -> command.setExecutor(new RepairCommand());
                 case SALVAGE -> command.setExecutor(new SalvageCommand());
                 case SALVAGE -> command.setExecutor(new SalvageCommand());
                 case SMELTING -> command.setExecutor(new SmeltingCommand());
                 case SMELTING -> command.setExecutor(new SmeltingCommand());
+                case SPEARS -> command.setExecutor(new SpearsCommand());
                 case SWORDS -> command.setExecutor(new SwordsCommand());
                 case SWORDS -> command.setExecutor(new SwordsCommand());
                 case TAMING -> command.setExecutor(new TamingCommand());
                 case TAMING -> command.setExecutor(new TamingCommand());
                 case TRIDENTS -> command.setExecutor(new TridentsCommand());
                 case TRIDENTS -> command.setExecutor(new TridentsCommand());

+ 15 - 3
src/main/java/com/gmail/nossr50/util/skills/SkillTools.java

@@ -166,9 +166,20 @@ public class SkillTools {
         /*
         /*
          * Build categorized skill lists
          * Build categorized skill lists
          */
          */
-
-        // We are in a game version with Maces
-        if (mcMMO.getCompatibilityManager().getMinecraftGameVersion().isAtLeast(1, 21, 0)) {
+        if (mcMMO.getCompatibilityManager().getMinecraftGameVersion().isAtLeast(1, 21, 11)) {
+            // We are in a game version with Spears and Maces
+            COMBAT_SKILLS = ImmutableList.of(
+                    PrimarySkillType.ARCHERY,
+                    PrimarySkillType.AXES,
+                    PrimarySkillType.CROSSBOWS,
+                    PrimarySkillType.MACES,
+                    PrimarySkillType.SWORDS,
+                    PrimarySkillType.SPEARS,
+                    PrimarySkillType.TAMING,
+                    PrimarySkillType.TRIDENTS,
+                    PrimarySkillType.UNARMED);
+        } else if (mcMMO.getCompatibilityManager().getMinecraftGameVersion().isAtLeast(1, 21, 0)) {
+            // We are in a game version with Maces
             COMBAT_SKILLS = ImmutableList.of(
             COMBAT_SKILLS = ImmutableList.of(
                     PrimarySkillType.ARCHERY,
                     PrimarySkillType.ARCHERY,
                     PrimarySkillType.AXES,
                     PrimarySkillType.AXES,
@@ -225,6 +236,7 @@ public class SkillTools {
             case TRIDENTS_SUPER_ABILITY -> PrimarySkillType.TRIDENTS;
             case TRIDENTS_SUPER_ABILITY -> PrimarySkillType.TRIDENTS;
             case EXPLOSIVE_SHOT -> PrimarySkillType.ARCHERY;
             case EXPLOSIVE_SHOT -> PrimarySkillType.ARCHERY;
             case MACES_SUPER_ABILITY -> PrimarySkillType.MACES;
             case MACES_SUPER_ABILITY -> PrimarySkillType.MACES;
+            case SPEARS_SUPER_ABILITY -> PrimarySkillType.SPEARS;
         };
         };
     }
     }
 
 

+ 18 - 0
src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java

@@ -544,7 +544,25 @@ public class TextComponentFactory {
         componentBuilder.append(Component.newline());
         componentBuilder.append(Component.newline());
     }
     }
 
 
+    /**
+     * @deprecated use appendSubSkillTextComponents(Player, List<Component>, PrimarySkillType)
+     * @param player target player
+     * @param textComponents list to append to
+     * @param parentSkill the parent skill
+     */
+    @Deprecated(since = "2.2.046", forRemoval = true)
     public static void getSubSkillTextComponents(Player player, List<Component> textComponents,
     public static void getSubSkillTextComponents(Player player, List<Component> textComponents,
+        PrimarySkillType parentSkill) {
+        appendSubSkillTextComponents(player, textComponents, parentSkill);
+    }
+
+    /**
+     * Appends sub-skill text components to a list for a given parent skill
+     * @param player target player
+     * @param textComponents list to append to
+     * @param parentSkill the parent skill
+     */
+    public static void appendSubSkillTextComponents(Player player, List<Component> textComponents,
             PrimarySkillType parentSkill) {
             PrimarySkillType parentSkill) {
         for (SubSkillType subSkillType : SubSkillType.values()) {
         for (SubSkillType subSkillType : SubSkillType.values()) {
             if (subSkillType.getParentSkill() == parentSkill) {
             if (subSkillType.getParentSkill() == parentSkill) {

+ 179 - 112
src/main/resources/plugin.yml

@@ -1,20 +1,20 @@
 name: mcMMO
 name: mcMMO
 version: ${project.version}
 version: ${project.version}
 description: >
 description: >
-  The goal of mcMMO is to take core Minecraft game mechanics and expand them into
-  add an extensive and quality RPG experience. Everything in mcMMO has been carefully
-  thought out and is constantly being improved upon. Currently, mcMMO adds thirteen
-  unique skills to train and level in. Each of these skills is highly customizable
-  through our configuration files, allowing server admins to tweak mcMMO to best suit
-  the needs of his or her server. Know that the mcMMO team is dedicated to providing
-  an ever-evolving experience, and that we carefully read all feedback and bug reports
-  in order to evaluate and balance the mechanics of mcMMO in every update.
+    The goal of mcMMO is to take core Minecraft game mechanics and expand them into
+    add an extensive and quality RPG experience. Everything in mcMMO has been carefully
+    thought out and is constantly being improved upon. Currently, mcMMO adds thirteen
+    unique skills to train and level in. Each of these skills is highly customizable
+    through our configuration files, allowing server admins to tweak mcMMO to best suit
+    the needs of his or her server. Know that the mcMMO team is dedicated to providing
+    an ever-evolving experience, and that we carefully read all feedback and bug reports
+    in order to evaluate and balance the mechanics of mcMMO in every update.
 
 
 author: nossr50
 author: nossr50
-authors: [GJ, NuclearW, bm01, Glitchfinder, TfT_02, t00thpick1, Riking, electronicboy, kashike]
+authors: [ GJ, NuclearW, bm01, Glitchfinder, TfT_02, t00thpick1, Riking, electronicboy, kashike ]
 website: https://www.mcmmo.org
 website: https://www.mcmmo.org
 main: com.gmail.nossr50.mcMMO
 main: com.gmail.nossr50.mcMMO
-softdepend: [WorldGuard, CombatTag, HealthBar, PlaceholderAPI, ProtocolLib]
+softdepend: [ WorldGuard, CombatTag, HealthBar, PlaceholderAPI, ProtocolLib ]
 load: POSTWORLD
 load: POSTWORLD
 folia-supported: true
 folia-supported: true
 api-version: 1.13
 api-version: 1.13
@@ -26,14 +26,14 @@ commands:
     mmocompat:
     mmocompat:
         description: Information about the server and whether its considered fully compatible or running in compatibility mode
         description: Information about the server and whether its considered fully compatible or running in compatibility mode
     mmodebug:
     mmodebug:
-        aliases: [mcmmodebugmode]
+        aliases: [ mcmmodebugmode ]
         description: Toggles a debug mode which will print useful information to chat
         description: Toggles a debug mode which will print useful information to chat
     mmoinfo:
     mmoinfo:
-        aliases: [mcinfo]
+        aliases: [ mcinfo ]
         description: Info pages for mcMMO
         description: Info pages for mcMMO
         permission: mcmmo.commands.mmoinfo
         permission: mcmmo.commands.mmoinfo
     xprate:
     xprate:
-        aliases: [mcxprate]
+        aliases: [ mcxprate ]
         description: Modify the xp rate or start an event
         description: Modify the xp rate or start an event
         permission: mcmmo.commands.xprate
         permission: mcmmo.commands.xprate
     mcmmo:
     mcmmo:
@@ -59,7 +59,7 @@ commands:
         permission: mcmmo.commands.mcrefresh
         permission: mcmmo.commands.mcrefresh
     mccooldown:
     mccooldown:
         description: Show the cooldowns on all your mcMMO abilities
         description: Show the cooldowns on all your mcMMO abilities
-        aliases: [mccooldowns]
+        aliases: [ mccooldowns ]
         permission: mcmmo.commands.mccooldown
         permission: mcmmo.commands.mccooldown
     mcchatspy:
     mcchatspy:
         description: Toggle mcMMO Party Chat spying on/off
         description: Toggle mcMMO Party Chat spying on/off
@@ -68,7 +68,7 @@ commands:
         description: Toggle mcMMO god-mode on/off
         description: Toggle mcMMO god-mode on/off
         permission: mcmmo.commands.mcgod
         permission: mcmmo.commands.mcgod
     mcstats:
     mcstats:
-        aliases: [stats]
+        aliases: [ stats ]
         description: Shows your mcMMO stats and xp
         description: Shows your mcMMO stats and xp
         permission: mcmmo.commands.mcstats
         permission: mcmmo.commands.mcstats
     mcremove:
     mcremove:
@@ -84,7 +84,7 @@ commands:
         description: Create/join a party
         description: Create/join a party
         permission: mcmmo.commands.party
         permission: mcmmo.commands.party
     inspect:
     inspect:
-        aliases: [mcinspect, mmoinspect]
+        aliases: [ mcinspect, mmoinspect ]
         description: View detailed mcMMO info on another player
         description: View detailed mcMMO info on another player
         permission: mcmmo.commands.inspect
         permission: mcmmo.commands.inspect
     mmoshowdb:
     mmoshowdb:
@@ -94,7 +94,7 @@ commands:
         description: Convert between different database and formula types
         description: Convert between different database and formula types
         permission: mcmmo.commands.mcconvert
         permission: mcmmo.commands.mcconvert
     partychat:
     partychat:
-        aliases: [pc, p]
+        aliases: [ pc, p ]
         description: Toggle Party chat or send party chat messages
         description: Toggle Party chat or send party chat messages
         permission: mcmmo.chat.partychat
         permission: mcmmo.chat.partychat
     skillreset:
     skillreset:
@@ -145,6 +145,9 @@ commands:
     smelting:
     smelting:
         description: Detailed mcMMO skill info
         description: Detailed mcMMO skill info
         permission: mcmmo.commands.smelting
         permission: mcmmo.commands.smelting
+    spears:
+        description: Detailed mcMMO skill info
+        permission: mcmmo.commands.spears
     alchemy:
     alchemy:
         description: Detailed mcMMO skill info
         description: Detailed mcMMO skill info
         permission: mcmmo.commands.alchemy
         permission: mcmmo.commands.alchemy
@@ -157,24 +160,24 @@ commands:
     mmopower:
     mmopower:
         description: Shows skill mastery and power level info
         description: Shows skill mastery and power level info
         permission: mcmmo.commands.mmopower
         permission: mcmmo.commands.mmopower
-        aliases: [mmopowerlevel, powerlevel]
+        aliases: [ mmopowerlevel, powerlevel ]
     adminchat:
     adminchat:
-        aliases: [ac, a]
+        aliases: [ ac, a ]
         description: Toggle Admin chat or send admin chat messages
         description: Toggle Admin chat or send admin chat messages
         permission: mcmmo.chat.adminchat
         permission: mcmmo.chat.adminchat
     mcpurge:
     mcpurge:
         description: Purge users with 0 powerlevel and/or who haven't connected in several months from the server DB.
         description: Purge users with 0 powerlevel and/or who haven't connected in several months from the server DB.
         permission: mcmmo.commands.mcpurge
         permission: mcmmo.commands.mcpurge
     mcnotify:
     mcnotify:
-        aliases: [notify]
+        aliases: [ notify ]
         description: Toggle mcMMO abilities chat display notifications on/off
         description: Toggle mcMMO abilities chat display notifications on/off
         permission: mcmmo.commands.mcnotify
         permission: mcmmo.commands.mcnotify
     mcscoreboard:
     mcscoreboard:
-        aliases: [mcsb]
+        aliases: [ mcsb ]
         description: Manage your mcMMO Scoreboard
         description: Manage your mcMMO Scoreboard
         permission: mcmmo.commands.mcscoreboard
         permission: mcmmo.commands.mcscoreboard
     mcmmoreloadlocale:
     mcmmoreloadlocale:
-        aliases: [mcreloadlocale]
+        aliases: [ mcreloadlocale ]
         description: Reloads locale
         description: Reloads locale
         permission: mcmmo.commands.reloadlocale
         permission: mcmmo.commands.reloadlocale
 permissions:
 permissions:
@@ -237,6 +240,7 @@ permissions:
             mcmmo.ability.repair.all: true
             mcmmo.ability.repair.all: true
             mcmmo.ability.salvage.all: true
             mcmmo.ability.salvage.all: true
             mcmmo.ability.smelting.all: true
             mcmmo.ability.smelting.all: true
+            mcmmo.ability.spears.all: true
             mcmmo.ability.swords.all: true
             mcmmo.ability.swords.all: true
             mcmmo.ability.taming.all: true
             mcmmo.ability.taming.all: true
             mcmmo.ability.tridents.all: true
             mcmmo.ability.tridents.all: true
@@ -320,19 +324,19 @@ permissions:
     mcmmo.ability.axes.skullsplitter:
     mcmmo.ability.axes.skullsplitter:
         description: Allows access to the Skull Splitter ability
         description: Allows access to the Skull Splitter ability
     mcmmo.ability.crossbows.*:
     mcmmo.ability.crossbows.*:
-          description: Allows access to all Crossbows abilities
-          children:
+        description: Allows access to all Crossbows abilities
+        children:
             mcmmo.ability.crossbows.all: true
             mcmmo.ability.crossbows.all: true
     mcmmo.ability.crossbows.all:
     mcmmo.ability.crossbows.all:
-            description: Allows access to all Crossbows abilities
-            children:
-                mcmmo.ability.crossbows.trickshot: true
-                mcmmo.ability.crossbows.poweredshot: true
-                mcmmo.ability.crossbows.crossbowslimitbreak: true
+        description: Allows access to all Crossbows abilities
+        children:
+            mcmmo.ability.crossbows.trickshot: true
+            mcmmo.ability.crossbows.poweredshot: true
+            mcmmo.ability.crossbows.crossbowslimitbreak: true
     mcmmo.ability.crossbows.crossbowslimitbreak:
     mcmmo.ability.crossbows.crossbowslimitbreak:
-            description: Adds damage to crossbows
+        description: Adds damage to crossbows
     mcmmo.ability.crossbows.trickshot:
     mcmmo.ability.crossbows.trickshot:
-            description: Allows access to the Trick Shot ability
+        description: Allows access to the Trick Shot ability
     mcmmo.ability.crossbows.poweredshot:
     mcmmo.ability.crossbows.poweredshot:
         description: Allows access to the Powered Shot ability
         description: Allows access to the Powered Shot ability
     mcmmo.ability.excavation.*:
     mcmmo.ability.excavation.*:
@@ -646,6 +650,17 @@ permissions:
         description: Allows access to the Second Smelt ability
         description: Allows access to the Second Smelt ability
     mcmmo.ability.smelting.vanillaxpboost:
     mcmmo.ability.smelting.vanillaxpboost:
         description: Allows vanilla XP boost from Smelting
         description: Allows vanilla XP boost from Smelting
+    mcmmo.ability.spears.*:
+        default: false
+        description: Allows access to all Spear abilities
+        children:
+            mcmmo.ability.spears.all: true
+    mcmmo.ability.spears.all:
+        description: Allows access to all Spear abilities
+        children:
+            mcmmo.ability.spears.spearslimitbreak: true
+    mcmmo.ability.spears.spearslimitbreak:
+        description: Adds damage to spears
     mcmmo.ability.swords.*:
     mcmmo.ability.swords.*:
         default: false
         default: false
         description: Allows access to all Swords abilities
         description: Allows access to all Swords abilities
@@ -885,6 +900,7 @@ permissions:
             mcmmo.commands.repair: true
             mcmmo.commands.repair: true
             mcmmo.commands.salvage: true
             mcmmo.commands.salvage: true
             mcmmo.commands.smelting: true
             mcmmo.commands.smelting: true
+            mcmmo.commands.spears: true
             mcmmo.commands.swords: true
             mcmmo.commands.swords: true
             mcmmo.commands.taming: true
             mcmmo.commands.taming: true
             mcmmo.commands.unarmed: true
             mcmmo.commands.unarmed: true
@@ -898,7 +914,7 @@ permissions:
             mcmmo.commands.addxp: true
             mcmmo.commands.addxp: true
             mcmmo.commands.addxp.others: true
             mcmmo.commands.addxp.others: true
             mcmmo.commands.defaults: true
             mcmmo.commands.defaults: true
-#            mcmmo.commands.hardcore.all: true
+            #            mcmmo.commands.hardcore.all: true
             mcmmo.commands.inspect.far: true
             mcmmo.commands.inspect.far: true
             mcmmo.commands.inspect.hidden: true
             mcmmo.commands.inspect.hidden: true
             mcmmo.commands.mcability.others: true
             mcmmo.commands.mcability.others: true
@@ -918,7 +934,7 @@ permissions:
             mcmmo.commands.ptp.world.all: true
             mcmmo.commands.ptp.world.all: true
             mcmmo.commands.reloadlocale: true
             mcmmo.commands.reloadlocale: true
             mcmmo.commands.skillreset.all: true
             mcmmo.commands.skillreset.all: true
-#            mcmmo.commands.vampirism.all: true
+            #            mcmmo.commands.vampirism.all: true
             mcmmo.commands.xprate.all: true
             mcmmo.commands.xprate.all: true
     mcmmo.commands.acrobatics:
     mcmmo.commands.acrobatics:
         description: Allows access to the acrobatics command
         description: Allows access to the acrobatics command
@@ -1058,6 +1074,7 @@ permissions:
             mcmmo.commands.mctop.repair: true
             mcmmo.commands.mctop.repair: true
             mcmmo.commands.mctop.salvage: true
             mcmmo.commands.mctop.salvage: true
             mcmmo.commands.mctop.smelting: true
             mcmmo.commands.mctop.smelting: true
+            mcmmo.commands.mctop.spears: true
             mcmmo.commands.mctop.swords: true
             mcmmo.commands.mctop.swords: true
             mcmmo.commands.mctop.taming: true
             mcmmo.commands.mctop.taming: true
             mcmmo.commands.mctop.tridents: true
             mcmmo.commands.mctop.tridents: true
@@ -1091,6 +1108,8 @@ permissions:
         description: Allows access to the mctop command for salvage
         description: Allows access to the mctop command for salvage
     mcmmo.commands.mctop.smelting:
     mcmmo.commands.mctop.smelting:
         description: Allows access to the mctop command for smelting
         description: Allows access to the mctop command for smelting
+    mcmmo.commands.mctop.spears:
+        description: Allows access to the mctop command for spears
     mcmmo.commands.mctop.swords:
     mcmmo.commands.mctop.swords:
         description: Allows access to the mctop command for swords
         description: Allows access to the mctop command for swords
     mcmmo.commands.mctop.taming:
     mcmmo.commands.mctop.taming:
@@ -1239,6 +1258,7 @@ permissions:
             mcmmo.commands.skillreset.repair: true
             mcmmo.commands.skillreset.repair: true
             mcmmo.commands.skillreset.salvage: true
             mcmmo.commands.skillreset.salvage: true
             mcmmo.commands.skillreset.smelting: true
             mcmmo.commands.skillreset.smelting: true
+            mcmmo.commands.skillreset.spears: true
             mcmmo.commands.skillreset.swords: true
             mcmmo.commands.skillreset.swords: true
             mcmmo.commands.skillreset.taming: true
             mcmmo.commands.skillreset.taming: true
             mcmmo.commands.skillreset.unarmed: true
             mcmmo.commands.skillreset.unarmed: true
@@ -1268,6 +1288,8 @@ permissions:
         description: Allows access to the skillreset command for crossbows
         description: Allows access to the skillreset command for crossbows
     mcmmo.commands.skillreset.tridents:
     mcmmo.commands.skillreset.tridents:
         description: Allows access to the skillreset command for tridents
         description: Allows access to the skillreset command for tridents
+    mcmmo.commands.skillreset.spears:
+        description: Allows access to the skillreset command for spears
     mcmmo.commands.skillreset.maces:
     mcmmo.commands.skillreset.maces:
         description: Allows access to the skillreset command for maces
         description: Allows access to the skillreset command for maces
     mcmmo.commands.skillreset.others.*:
     mcmmo.commands.skillreset.others.*:
@@ -1290,6 +1312,7 @@ permissions:
             mcmmo.commands.skillreset.others.repair: true
             mcmmo.commands.skillreset.others.repair: true
             mcmmo.commands.skillreset.others.salvage: true
             mcmmo.commands.skillreset.others.salvage: true
             mcmmo.commands.skillreset.others.smelting: true
             mcmmo.commands.skillreset.others.smelting: true
+            mcmmo.commands.skillreset.others.spears: true
             mcmmo.commands.skillreset.others.swords: true
             mcmmo.commands.skillreset.others.swords: true
             mcmmo.commands.skillreset.others.taming: true
             mcmmo.commands.skillreset.others.taming: true
             mcmmo.commands.skillreset.others.unarmed: true
             mcmmo.commands.skillreset.others.unarmed: true
@@ -1321,6 +1344,8 @@ permissions:
         description: Allows access to the skillreset command for salvage for other players
         description: Allows access to the skillreset command for salvage for other players
     mcmmo.commands.skillreset.others.smelting:
     mcmmo.commands.skillreset.others.smelting:
         description: Allows access to the skillreset command for smelting for other players
         description: Allows access to the skillreset command for smelting for other players
+    mcmmo.commands.skillreset.others.spears:
+        description: Allows access to the skillreset command for spears for other players
     mcmmo.commands.skillreset.others.swords:
     mcmmo.commands.skillreset.others.swords:
         description: Allows access to the skillreset command for swords for other players
         description: Allows access to the skillreset command for swords for other players
     mcmmo.commands.skillreset.others.taming:
     mcmmo.commands.skillreset.others.taming:
@@ -1406,7 +1431,7 @@ permissions:
         default: false
         default: false
         description: implies access to all mcmmo perks
         description: implies access to all mcmmo perks
         children:
         children:
-            mcmmo.perks.all: true 
+            mcmmo.perks.all: true
     mcmmo.perks.all:
     mcmmo.perks.all:
         default: false
         default: false
         description: implies access to all mcmmo perks
         description: implies access to all mcmmo perks
@@ -1497,6 +1522,7 @@ permissions:
             mcmmo.perks.lucky.repair: true
             mcmmo.perks.lucky.repair: true
             mcmmo.perks.lucky.salvage: true
             mcmmo.perks.lucky.salvage: true
             mcmmo.perks.lucky.smelting: true
             mcmmo.perks.lucky.smelting: true
+            mcmmo.perks.lucky.spears: true
             mcmmo.perks.lucky.swords: true
             mcmmo.perks.lucky.swords: true
             mcmmo.perks.lucky.taming: true
             mcmmo.perks.lucky.taming: true
             mcmmo.perks.lucky.unarmed: true
             mcmmo.perks.lucky.unarmed: true
@@ -1539,6 +1565,9 @@ permissions:
     mcmmo.perks.lucky.salvage:
     mcmmo.perks.lucky.salvage:
         default: false
         default: false
         description: Gives Salvage abilities & skills a 33.3% better chance to activate.
         description: Gives Salvage abilities & skills a 33.3% better chance to activate.
+    mcmmo.perks.lucky.spears:
+        default: false
+        description: Gives Spears abilities & skills a 33.3% better chance to activate.
     mcmmo.perks.lucky.smelting:
     mcmmo.perks.lucky.smelting:
         default: false
         default: false
         description: Gives Smelting abilities & skills a 33.3% better chance to activate.
         description: Gives Smelting abilities & skills a 33.3% better chance to activate.
@@ -1600,6 +1629,7 @@ permissions:
             mcmmo.perks.xp.150percentboost.mining: true
             mcmmo.perks.xp.150percentboost.mining: true
             mcmmo.perks.xp.150percentboost.repair: true
             mcmmo.perks.xp.150percentboost.repair: true
             mcmmo.perks.xp.150percentboost.smelting: true
             mcmmo.perks.xp.150percentboost.smelting: true
+            mcmmo.perks.xp.150percentboost.spears: true
             mcmmo.perks.xp.150percentboost.swords: true
             mcmmo.perks.xp.150percentboost.swords: true
             mcmmo.perks.xp.150percentboost.taming: true
             mcmmo.perks.xp.150percentboost.taming: true
             mcmmo.perks.xp.150percentboost.tridents: true
             mcmmo.perks.xp.150percentboost.tridents: true
@@ -1641,6 +1671,9 @@ permissions:
     mcmmo.perks.xp.150percentboost.smelting:
     mcmmo.perks.xp.150percentboost.smelting:
         default: false
         default: false
         description: Multiplies incoming Smelting XP by 2.5
         description: Multiplies incoming Smelting XP by 2.5
+    mcmmo.perks.xp.150percentboost.spears:
+        default: false
+        description: Multiplies incoming Spears XP by 2.5
     mcmmo.perks.xp.150percentboost.swords:
     mcmmo.perks.xp.150percentboost.swords:
         default: false
         default: false
         description: Multiplies incoming Swords XP by 2.5
         description: Multiplies incoming Swords XP by 2.5
@@ -1682,6 +1715,7 @@ permissions:
             mcmmo.perks.xp.50percentboost.mining: true
             mcmmo.perks.xp.50percentboost.mining: true
             mcmmo.perks.xp.50percentboost.repair: true
             mcmmo.perks.xp.50percentboost.repair: true
             mcmmo.perks.xp.50percentboost.smelting: true
             mcmmo.perks.xp.50percentboost.smelting: true
+            mcmmo.perks.xp.50percentboost.spears: true
             mcmmo.perks.xp.50percentboost.swords: true
             mcmmo.perks.xp.50percentboost.swords: true
             mcmmo.perks.xp.50percentboost.taming: true
             mcmmo.perks.xp.50percentboost.taming: true
             mcmmo.perks.xp.50percentboost.tridents: true
             mcmmo.perks.xp.50percentboost.tridents: true
@@ -1720,6 +1754,9 @@ permissions:
     mcmmo.perks.xp.50percentboost.repair:
     mcmmo.perks.xp.50percentboost.repair:
         default: false
         default: false
         description: Multiplies incoming Repair XP by 1.5
         description: Multiplies incoming Repair XP by 1.5
+    mcmmo.perks.xp.50percentboost.spears:
+        default: false
+        description: Multiplies incoming Spears XP by 1.5
     mcmmo.perks.xp.50percentboost.smelting:
     mcmmo.perks.xp.50percentboost.smelting:
         default: false
         default: false
         description: Multiplies incoming Smelting XP by 1.5
         description: Multiplies incoming Smelting XP by 1.5
@@ -1739,87 +1776,91 @@ permissions:
         default: false
         default: false
         description: Multiplies incoming Woodcutting XP by 1.5
         description: Multiplies incoming Woodcutting XP by 1.5
     mcmmo.perks.xp.25percentboost.*:
     mcmmo.perks.xp.25percentboost.*:
-      default: false
-      description: Multiplies incoming XP by 1.25
-      children:
-        mcmmo.perks.xp.25percentboost.all: true
-      mcmmo.perks.xp.25percentboost:
         default: false
         default: false
         description: Multiplies incoming XP by 1.25
         description: Multiplies incoming XP by 1.25
         children:
         children:
-          mcmmo.perks.xp.25percentboost.all: true
-      mcmmo.perks.xp.25percentboost.all:
-        default: false
-        description: Multiplies incoming XP by 1.25
-        children:
-            mcmmo.perks.xp.25percentboost.acrobatics: true
-            mcmmo.perks.xp.25percentboost.alchemy: true
-            mcmmo.perks.xp.25percentboost.archery: true
-            mcmmo.perks.xp.25percentboost.axes: true
-            mcmmo.perks.xp.25percentboost.crossbows: true
-            mcmmo.perks.xp.25percentboost.excavation: true
-            mcmmo.perks.xp.25percentboost.fishing: true
-            mcmmo.perks.xp.25percentboost.herbalism: true
-            mcmmo.perks.xp.25percentboost.maces: true
-            mcmmo.perks.xp.25percentboost.mining: true
-            mcmmo.perks.xp.25percentboost.repair: true
-            mcmmo.perks.xp.25percentboost.smelting: true
-            mcmmo.perks.xp.25percentboost.swords: true
-            mcmmo.perks.xp.25percentboost.taming: true
-            mcmmo.perks.xp.25percentboost.tridents: true
-            mcmmo.perks.xp.25percentboost.unarmed: true
-            mcmmo.perks.xp.25percentboost.woodcutting: true
-      mcmmo.perks.xp.25percentboost.acrobatics:
-        default: false
-        description: Multiplies incoming Acrobatics XP by 1.25
-      mcmmo.perks.xp.25percentboost.alchemy:
-        default: false
-        description: Multiplies incoming Acrobatics XP by 1.25
-      mcmmo.perks.xp.25percentboost.archery:
-        default: false
-        description: Multiplies incoming Archery XP by 1.25
-      mcmmo.perks.xp.25percentboost.axes:
-        default: false
-        description: Multiplies incoming Axes XP by 1.25
-      mcmmo.perks.xp.25percentboost.crossbows:
-        default: false
-        description: Multiplies incoming Crossbows XP by 1.25
-      mcmmo.perks.xp.25percentboost.excavation:
-        default: false
-        description: Multiplies incoming Excavation XP by 1.25
-      mcmmo.perks.xp.25percentboost.fishing:
-        default: false
-        description: Multiplies incoming Fishing XP by 1.25
-      mcmmo.perks.xp.25percentboost.herbalism:
-        default: false
-        description: Multiplies incoming Herbalism XP by 1.25
-      mcmmo.perks.xp.25percentboost.maces:
-        default: false
-        description: Multiplies incoming Maces XP by 1.25
-      mcmmo.perks.xp.25percentboost.mining:
-        default: false
-        description: Multiplies incoming Mining XP by 1.25
-      mcmmo.perks.xp.25percentboost.repair:
-        default: false
-        description: Multiplies incoming Repair XP by 1.25
-      mcmmo.perks.xp.25percentboost.smelting:
-        default: false
-        description: Multiplies incoming Smelting XP by 1.25
-      mcmmo.perks.xp.25percentboost.swords:
-        default: false
-        description: Multiplies incoming Swords XP by 1.25
-      mcmmo.perks.xp.25percentboost.taming:
-        default: false
-        description: Multiplies incoming Taming XP by 1.25
-      mcmmo.perks.xp.25percentboost.tridents:
-        default: false
-        description: Multiplies incoming Tridents XP by 1.25
-      mcmmo.perks.xp.25percentboost.unarmed:
-        default: false
-        description: Multiplies incoming Unarmed XP by 1.5
-      mcmmo.perks.xp.25percentboost.woodcutting:
-        default: false
-        description: Multiplies incoming Woodcutting XP by 1.25
+            mcmmo.perks.xp.25percentboost.all: true
+        mcmmo.perks.xp.25percentboost:
+            default: false
+            description: Multiplies incoming XP by 1.25
+            children:
+                mcmmo.perks.xp.25percentboost.all: true
+        mcmmo.perks.xp.25percentboost.all:
+            default: false
+            description: Multiplies incoming XP by 1.25
+            children:
+                mcmmo.perks.xp.25percentboost.acrobatics: true
+                mcmmo.perks.xp.25percentboost.alchemy: true
+                mcmmo.perks.xp.25percentboost.archery: true
+                mcmmo.perks.xp.25percentboost.axes: true
+                mcmmo.perks.xp.25percentboost.crossbows: true
+                mcmmo.perks.xp.25percentboost.excavation: true
+                mcmmo.perks.xp.25percentboost.fishing: true
+                mcmmo.perks.xp.25percentboost.herbalism: true
+                mcmmo.perks.xp.25percentboost.maces: true
+                mcmmo.perks.xp.25percentboost.mining: true
+                mcmmo.perks.xp.25percentboost.repair: true
+                mcmmo.perks.xp.25percentboost.smelting: true
+                mcmmo.perks.xp.25percentboost.spears: true
+                mcmmo.perks.xp.25percentboost.swords: true
+                mcmmo.perks.xp.25percentboost.taming: true
+                mcmmo.perks.xp.25percentboost.tridents: true
+                mcmmo.perks.xp.25percentboost.unarmed: true
+                mcmmo.perks.xp.25percentboost.woodcutting: true
+        mcmmo.perks.xp.25percentboost.acrobatics:
+            default: false
+            description: Multiplies incoming Acrobatics XP by 1.25
+        mcmmo.perks.xp.25percentboost.alchemy:
+            default: false
+            description: Multiplies incoming Acrobatics XP by 1.25
+        mcmmo.perks.xp.25percentboost.archery:
+            default: false
+            description: Multiplies incoming Archery XP by 1.25
+        mcmmo.perks.xp.25percentboost.axes:
+            default: false
+            description: Multiplies incoming Axes XP by 1.25
+        mcmmo.perks.xp.25percentboost.crossbows:
+            default: false
+            description: Multiplies incoming Crossbows XP by 1.25
+        mcmmo.perks.xp.25percentboost.excavation:
+            default: false
+            description: Multiplies incoming Excavation XP by 1.25
+        mcmmo.perks.xp.25percentboost.fishing:
+            default: false
+            description: Multiplies incoming Fishing XP by 1.25
+        mcmmo.perks.xp.25percentboost.herbalism:
+            default: false
+            description: Multiplies incoming Herbalism XP by 1.25
+        mcmmo.perks.xp.25percentboost.maces:
+            default: false
+            description: Multiplies incoming Maces XP by 1.25
+        mcmmo.perks.xp.25percentboost.mining:
+            default: false
+            description: Multiplies incoming Mining XP by 1.25
+        mcmmo.perks.xp.25percentboost.repair:
+            default: false
+            description: Multiplies incoming Repair XP by 1.25
+        mcmmo.perks.xp.25percentboost.smelting:
+            default: false
+            description: Multiplies incoming Smelting XP by 1.25
+        mcmmo.perks.xp.25percentboost.spears:
+            default: false
+            description: Multiplies incoming Spears XP by 1.25
+        mcmmo.perks.xp.25percentboost.swords:
+            default: false
+            description: Multiplies incoming Swords XP by 1.25
+        mcmmo.perks.xp.25percentboost.taming:
+            default: false
+            description: Multiplies incoming Taming XP by 1.25
+        mcmmo.perks.xp.25percentboost.tridents:
+            default: false
+            description: Multiplies incoming Tridents XP by 1.25
+        mcmmo.perks.xp.25percentboost.unarmed:
+            default: false
+            description: Multiplies incoming Unarmed XP by 1.5
+        mcmmo.perks.xp.25percentboost.woodcutting:
+            default: false
+            description: Multiplies incoming Woodcutting XP by 1.25
     mcmmo.perks.xp.10percentboost.*:
     mcmmo.perks.xp.10percentboost.*:
         default: false
         default: false
         description: Multiplies incoming XP by 1.1
         description: Multiplies incoming XP by 1.1
@@ -1846,6 +1887,7 @@ permissions:
             mcmmo.perks.xp.10percentboost.mining: true
             mcmmo.perks.xp.10percentboost.mining: true
             mcmmo.perks.xp.10percentboost.repair: true
             mcmmo.perks.xp.10percentboost.repair: true
             mcmmo.perks.xp.10percentboost.smelting: true
             mcmmo.perks.xp.10percentboost.smelting: true
+            mcmmo.perks.xp.10percentboost.spears: true
             mcmmo.perks.xp.10percentboost.swords: true
             mcmmo.perks.xp.10percentboost.swords: true
             mcmmo.perks.xp.10percentboost.taming: true
             mcmmo.perks.xp.10percentboost.taming: true
             mcmmo.perks.xp.10percentboost.tridents: true
             mcmmo.perks.xp.10percentboost.tridents: true
@@ -1884,6 +1926,9 @@ permissions:
     mcmmo.perks.xp.10percentboost.repair:
     mcmmo.perks.xp.10percentboost.repair:
         default: false
         default: false
         description: Multiplies incoming Repair XP by 1.1
         description: Multiplies incoming Repair XP by 1.1
+    mcmmo.perks.xp.10percentboost.spears:
+        default: false
+        description: Multiplies incoming Spears XP by 1.1
     mcmmo.perks.xp.10percentboost.smelting:
     mcmmo.perks.xp.10percentboost.smelting:
         default: false
         default: false
         description: Multiplies incoming Smelting XP by 1.1
         description: Multiplies incoming Smelting XP by 1.1
@@ -1928,6 +1973,7 @@ permissions:
             mcmmo.perks.xp.customboost.mining: true
             mcmmo.perks.xp.customboost.mining: true
             mcmmo.perks.xp.customboost.repair: true
             mcmmo.perks.xp.customboost.repair: true
             mcmmo.perks.xp.customboost.smelting: true
             mcmmo.perks.xp.customboost.smelting: true
+            mcmmo.perks.xp.customboost.spears: true
             mcmmo.perks.xp.customboost.swords: true
             mcmmo.perks.xp.customboost.swords: true
             mcmmo.perks.xp.customboost.taming: true
             mcmmo.perks.xp.customboost.taming: true
             mcmmo.perks.xp.customboost.tridents: true
             mcmmo.perks.xp.customboost.tridents: true
@@ -1966,6 +2012,9 @@ permissions:
     mcmmo.perks.xp.customboost.repair:
     mcmmo.perks.xp.customboost.repair:
         default: false
         default: false
         description: Multiplies incoming Repair XP by the boost amount defined in the experience config
         description: Multiplies incoming Repair XP by the boost amount defined in the experience config
+    mcmmo.perks.xp.customboost.spears:
+        default: false
+        description: Multiplies incoming Smelting XP by the boost amount defined in the experience config
     mcmmo.perks.xp.customboost.smelting:
     mcmmo.perks.xp.customboost.smelting:
         default: false
         default: false
         description: Multiplies incoming Smelting XP by the boost amount defined in the experience config
         description: Multiplies incoming Smelting XP by the boost amount defined in the experience config
@@ -2010,6 +2059,7 @@ permissions:
             mcmmo.perks.xp.double.mining: true
             mcmmo.perks.xp.double.mining: true
             mcmmo.perks.xp.double.repair: true
             mcmmo.perks.xp.double.repair: true
             mcmmo.perks.xp.double.smelting: true
             mcmmo.perks.xp.double.smelting: true
+            mcmmo.perks.xp.double.spears: true
             mcmmo.perks.xp.double.swords: true
             mcmmo.perks.xp.double.swords: true
             mcmmo.perks.xp.double.taming: true
             mcmmo.perks.xp.double.taming: true
             mcmmo.perks.xp.double.tridents: true
             mcmmo.perks.xp.double.tridents: true
@@ -2048,6 +2098,9 @@ permissions:
     mcmmo.perks.xp.double.repair:
     mcmmo.perks.xp.double.repair:
         default: false
         default: false
         description: Doubles incoming Repair XP
         description: Doubles incoming Repair XP
+    mcmmo.perks.xp.double.spears:
+        default: false
+        description: Doubles incoming Smelting XP
     mcmmo.perks.xp.double.smelting:
     mcmmo.perks.xp.double.smelting:
         default: false
         default: false
         description: Doubles incoming Smelting XP
         description: Doubles incoming Smelting XP
@@ -2092,6 +2145,7 @@ permissions:
             mcmmo.perks.xp.quadruple.mining: true
             mcmmo.perks.xp.quadruple.mining: true
             mcmmo.perks.xp.quadruple.repair: true
             mcmmo.perks.xp.quadruple.repair: true
             mcmmo.perks.xp.quadruple.smelting: true
             mcmmo.perks.xp.quadruple.smelting: true
+            mcmmo.perks.xp.quadruple.spears: true
             mcmmo.perks.xp.quadruple.swords: true
             mcmmo.perks.xp.quadruple.swords: true
             mcmmo.perks.xp.quadruple.taming: true
             mcmmo.perks.xp.quadruple.taming: true
             mcmmo.perks.xp.quadruple.tridents: true
             mcmmo.perks.xp.quadruple.tridents: true
@@ -2133,6 +2187,9 @@ permissions:
     mcmmo.perks.xp.quadruple.smelting:
     mcmmo.perks.xp.quadruple.smelting:
         default: false
         default: false
         description: Quadruples incoming Smelting XP
         description: Quadruples incoming Smelting XP
+    mcmmo.perks.xp.quadruple.spears:
+        default: false
+        description: Quadruples incoming Spears XP
     mcmmo.perks.xp.quadruple.swords:
     mcmmo.perks.xp.quadruple.swords:
         default: false
         default: false
         description: Quadruples incoming Swords XP
         description: Quadruples incoming Swords XP
@@ -2174,6 +2231,7 @@ permissions:
             mcmmo.perks.xp.triple.maces: true
             mcmmo.perks.xp.triple.maces: true
             mcmmo.perks.xp.triple.repair: true
             mcmmo.perks.xp.triple.repair: true
             mcmmo.perks.xp.triple.smelting: true
             mcmmo.perks.xp.triple.smelting: true
+            mcmmo.perks.xp.triple.spears: true
             mcmmo.perks.xp.triple.swords: true
             mcmmo.perks.xp.triple.swords: true
             mcmmo.perks.xp.triple.taming: true
             mcmmo.perks.xp.triple.taming: true
             mcmmo.perks.xp.triple.tridents: true
             mcmmo.perks.xp.triple.tridents: true
@@ -2215,6 +2273,9 @@ permissions:
     mcmmo.perks.xp.triple.smelting:
     mcmmo.perks.xp.triple.smelting:
         default: false
         default: false
         description: Triples incoming Smelting XP
         description: Triples incoming Smelting XP
+    mcmmo.perks.xp.triple.spears:
+        default: false
+        description: Triples incoming Spears XP
     mcmmo.perks.xp.triple.swords:
     mcmmo.perks.xp.triple.swords:
         default: false
         default: false
         description: Triples incoming Swords XP
         description: Triples incoming Swords XP
@@ -2257,6 +2318,7 @@ permissions:
             mcmmo.skills.salvage: true
             mcmmo.skills.salvage: true
             mcmmo.skills.swords: true
             mcmmo.skills.swords: true
             mcmmo.skills.smelting: true
             mcmmo.skills.smelting: true
+            mcmmo.skills.spears: true
             mcmmo.skills.taming: true
             mcmmo.skills.taming: true
             mcmmo.skills.unarmed: true
             mcmmo.skills.unarmed: true
             mcmmo.skills.woodcutting: true
             mcmmo.skills.woodcutting: true
@@ -2322,6 +2384,11 @@ permissions:
         children:
         children:
             mcmmo.ability.smelting.all: true
             mcmmo.ability.smelting.all: true
             mcmmo.commands.smelting: true
             mcmmo.commands.smelting: true
+    mcmmo.skills.spears:
+        description: Allows access to the Spears skill
+        children:
+            mcmmo.ability.smelting.all: true
+            mcmmo.commands.smelting: true
     mcmmo.skills.swords:
     mcmmo.skills.swords:
         description: Allows access to the Swords skill
         description: Allows access to the Swords skill
         children:
         children:

+ 24 - 0
src/main/resources/skillranks.yml

@@ -404,6 +404,30 @@ Smelting:
             Rank_6: 750
             Rank_6: 750
             Rank_7: 850
             Rank_7: 850
             Rank_8: 1000
             Rank_8: 1000
+Spears:
+    SpearsLimitBreak:
+        Standard:
+            Rank_1: 10
+            Rank_2: 20
+            Rank_3: 30
+            Rank_4: 40
+            Rank_5: 50
+            Rank_6: 60
+            Rank_7: 70
+            Rank_8: 80
+            Rank_9: 90
+            Rank_10: 100
+        RetroMode:
+            Rank_1: 100
+            Rank_2: 200
+            Rank_3: 300
+            Rank_4: 400
+            Rank_5: 500
+            Rank_6: 600
+            Rank_7: 700
+            Rank_8: 800
+            Rank_9: 900
+            Rank_10: 1000
 Salvage:
 Salvage:
     ScrapCollector:
     ScrapCollector:
         Standard:
         Standard: