diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java index c86259221..abd5b19e4 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java @@ -75,12 +75,12 @@ public enum SubSkillType { /* Taming */ TAMING_BEAST_LORE(1), - TAMING_CALL_OF_THE_WILD, + TAMING_CALL_OF_THE_WILD(1), TAMING_ENVIRONMENTALLY_AWARE(1), TAMING_FAST_FOOD_SERVICE(1), - TAMING_GORE, + TAMING_GORE(1), TAMING_HOLY_HOUND(1), - TAMING_PUMMEL, + TAMING_PUMMEL(1), TAMING_SHARPENED_CLAWS(1), TAMING_SHOCK_PROOF(1), TAMING_THICK_FUR(1), diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index 543d929cc..2703d0353 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -64,6 +64,9 @@ public class TamingManager extends SkillManager { } public boolean canUseGore() { + if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_GORE)) + return false; + return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.TAMING_GORE); } @@ -135,6 +138,9 @@ public class TamingManager extends SkillManager { * Summon an ocelot to your side. */ public void summonOcelot() { + if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_CALL_OF_THE_WILD)) + return; + if (!Permissions.callOfTheWild(getPlayer(), EntityType.OCELOT)) { return; } @@ -146,6 +152,9 @@ public class TamingManager extends SkillManager { * Summon a wolf to your side. */ public void summonWolf() { + if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_CALL_OF_THE_WILD)) + return; + if (!Permissions.callOfTheWild(getPlayer(), EntityType.WOLF)) { return; } @@ -157,6 +166,9 @@ public class TamingManager extends SkillManager { * Summon a horse to your side. */ public void summonHorse() { + if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_CALL_OF_THE_WILD)) + return; + if (!Permissions.callOfTheWild(getPlayer(), EntityType.HORSE)) { return; } @@ -195,6 +207,9 @@ public class TamingManager extends SkillManager { } public void pummel(LivingEntity target, Wolf wolf) { + if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_PUMMEL)) + return; + double chance = 10 / activationChance; SubSkillRandomCheckEvent event = new SubSkillRandomCheckEvent(getPlayer(), SubSkillType.TAMING_PUMMEL, chance); mcMMO.p.getServer().getPluginManager().callEvent(event); diff --git a/src/main/resources/skillranks.yml b/src/main/resources/skillranks.yml index 1582ec1de..2f530c763 100644 --- a/src/main/resources/skillranks.yml +++ b/src/main/resources/skillranks.yml @@ -161,11 +161,26 @@ Taming: Rank_1: 2 RetroMode: Rank_1: 20 - FastFoodService: + Gore: + Standard: + Rank_1: 15 + RetroMode: + Rank_1: 150 + CallOfTheWild: Standard: Rank_1: 5 RetroMode: Rank_1: 50 + Pummel: + Standard: + Rank_1: 20 + RetroMode: + Rank_1: 200 + FastFoodService: + Standard: + Rank_1: 20 + RetroMode: + Rank_1: 200 EnvironmentallyAware: Standard: Rank_1: 10