mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Renamed Cone of Death to Super Shotgun
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
 | 
			
		||||
        List<String> messages = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
        /*
 | 
			
		||||
                List<String> 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<TextComponent> getTextComponents(Player player) {
 | 
			
		||||
        return null;
 | 
			
		||||
        List<TextComponent> textComponents = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
        TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES);
 | 
			
		||||
 | 
			
		||||
        return textComponents;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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<TextComponent> getTextComponents(Player player) {
 | 
			
		||||
        return null;
 | 
			
		||||
        List<TextComponent> textComponents = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
        TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES);
 | 
			
		||||
 | 
			
		||||
        return textComponents;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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<? extends SkillManager> managerClass;
 | 
			
		||||
    private final Color skillColor;
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ public enum SubSkillType {
 | 
			
		||||
 | 
			
		||||
    /* CROSSBOWS */
 | 
			
		||||
 | 
			
		||||
    CROSSBOWS_CONE_OF_DEATH(3),
 | 
			
		||||
    CROSSBOWS_SUPER_SHOTGUN(3),
 | 
			
		||||
    CROSSBOWS_CROSSBOWS_LIMIT_BREAK(10);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -730,7 +730,7 @@ Crossbows:
 | 
			
		||||
            Rank_8: 800
 | 
			
		||||
            Rank_9: 900
 | 
			
		||||
            Rank_10: 1000
 | 
			
		||||
    ConeOfDeath:
 | 
			
		||||
    SuperShotgun:
 | 
			
		||||
        Standard:
 | 
			
		||||
            Rank_1: 1
 | 
			
		||||
            Rank_2: 50
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user