diff --git a/Changelog.txt b/Changelog.txt index 781ada65e..b1fe40a04 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -10,7 +10,7 @@ Version 2.2.000 Added Sub-Skill named Multi Tasking to Tridents Added Sub-Skill named Tridents Limit Break to Tridents - Added Sub-Skill named Cone of Death to Crossbows + Added Sub-Skill named Super Shotgun to Crossbows Added Sub-Skill named Crossbows Limit Break to Crossbows Permission node descriptions had mentions of ability changed to sub-skill and other minor corrections diff --git a/src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java index 30966cf7a..af701d6be 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/CrossbowsCommand.java @@ -1,9 +1,12 @@ package com.gmail.nossr50.commands.skills; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.datatypes.skills.SubSkillType; +import com.gmail.nossr50.util.TextComponentFactory; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.entity.Player; +import java.util.ArrayList; import java.util.List; public class CrossbowsCommand extends SkillCommand { @@ -23,11 +26,30 @@ public class CrossbowsCommand extends SkillCommand { @Override protected List statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) { + List messages = new ArrayList<>(); + + /* + List messages = new ArrayList<>(); + + ExcavationManager excavationManager = UserManager.getPlayer(player).getExcavationManager(); + + if (canGigaDrill) { + messages.add(getStatMessage(SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER, gigaDrillBreakerLength) + + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : "")); + */ + if(canUseSubskill(player, SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) { + + } + return null; } @Override protected List getTextComponents(Player player) { - return null; + List textComponents = new ArrayList<>(); + + TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES); + + return textComponents; } } diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java index dffb976cd..b09609f8b 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java @@ -1,9 +1,11 @@ package com.gmail.nossr50.commands.skills; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.util.TextComponentFactory; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.entity.Player; +import java.util.ArrayList; import java.util.List; public class TridentsCommand extends SkillCommand { @@ -28,6 +30,10 @@ public class TridentsCommand extends SkillCommand { @Override protected List getTextComponents(Player player) { - return null; + List textComponents = new ArrayList<>(); + + TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES); + + return textComponents; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java index 28871478a..1d07514c4 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java @@ -67,7 +67,7 @@ public enum PrimarySkillType { WOODCUTTING(WoodcuttingManager.class, Color.OLIVE, SuperAbilityType.TREE_FELLER, ToolType.AXE, ImmutableList.of(SubSkillType.WOODCUTTING_LEAF_BLOWER, SubSkillType.WOODCUTTING_TREE_FELLER, SubSkillType.WOODCUTTING_HARVEST_LUMBER)), TRIDENTS(TridentManager.class, Color.TEAL, ImmutableList.of(SubSkillType.TRIDENTS_MULTI_TASKING, SubSkillType.TRIDENTS_TRIDENTS_LIMIT_BREAK)), - CROSSBOWS(CrossbowManager.class, Color.ORANGE, ImmutableList.of(SubSkillType.CROSSBOWS_CONE_OF_DEATH, SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK)); + CROSSBOWS(CrossbowManager.class, Color.ORANGE, ImmutableList.of(SubSkillType.CROSSBOWS_SUPER_SHOTGUN, SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK)); private final Class managerClass; private final Color skillColor; 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 289e6f8a1..8a2403465 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java @@ -113,7 +113,7 @@ public enum SubSkillType { /* CROSSBOWS */ - CROSSBOWS_CONE_OF_DEATH(3), + CROSSBOWS_SUPER_SHOTGUN(3), CROSSBOWS_CROSSBOWS_LIMIT_BREAK(10); diff --git a/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowManager.java b/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowManager.java index 114515831..d79641c0e 100644 --- a/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowManager.java +++ b/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowManager.java @@ -9,7 +9,6 @@ import com.gmail.nossr50.skills.archery.Archery; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.RankUtils; import org.apache.commons.lang.math.RandomUtils; -import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Entity; @@ -19,9 +18,6 @@ import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.Random; - public class CrossbowManager extends SkillManager { public CrossbowManager(McMMOPlayer mcMMOPlayer) { super(mcMMOPlayer, PrimarySkillType.CROSSBOWS); @@ -58,7 +54,7 @@ public class CrossbowManager extends SkillManager { mcMMOPlayer.getPlayer().sendMessage("Pew pew!"); //Testing - if(Permissions.isSubSkillEnabled(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_CONE_OF_DEATH)) { + if(Permissions.isSubSkillEnabled(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) { coneOfDeathProcessing(projectileLaunchEvent); } } @@ -83,7 +79,7 @@ public class CrossbowManager extends SkillManager { } private int getConeOfDeathProjectileCount() { - switch(RankUtils.getRank(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_CONE_OF_DEATH)) { + switch(RankUtils.getRank(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) { case 1: return 9; case 2: diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 11fff8f2f..2cdde1b69 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -739,12 +739,12 @@ permissions: mcmmo.ability.crossbows.all: description: Allows access to Crossbow sub-skills children: - mcmmo.ability.crossbows.coneofdeath: true + mcmmo.ability.crossbows.supershotgun: true mcmmo.ability.crossbows.crossbowslimitbreak: true mcmmo.ability.crossbows.crossbowslimitbreak: description: Allows access to Crossbows Limit Break sub-skill - mcmmo.ability.crossbows.coneofdeath: - description: Allows access to Cone of Death sub-skill + mcmmo.ability.crossbows.supershotgun: + description: Allows access to Super Shotgun sub-skill mcmmo.admin: default: false description: Implies access to everything in mcMMO diff --git a/src/main/resources/skillranks.yml b/src/main/resources/skillranks.yml index 6837c5720..cca164976 100644 --- a/src/main/resources/skillranks.yml +++ b/src/main/resources/skillranks.yml @@ -730,7 +730,7 @@ Crossbows: Rank_8: 800 Rank_9: 900 Rank_10: 1000 - ConeOfDeath: + SuperShotgun: Standard: Rank_1: 1 Rank_2: 50