Cleaning up Herbalism & Mining Skill Command

This commit is contained in:
nossr50 2019-01-15 05:56:49 -08:00
parent 52355b2757
commit 6ce44b7ce8
4 changed files with 18 additions and 6 deletions

View File

@ -89,8 +89,8 @@ public class HerbalismCommand extends SkillCommand {
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
hasHylianLuck = canUseSubskill(player, SubSkillType.HERBALISM_HYLIAN_LUCK); hasHylianLuck = canUseSubskill(player, SubSkillType.HERBALISM_HYLIAN_LUCK);
canGreenTerra = Permissions.greenTerra(player); canGreenTerra = Permissions.greenTerra(player);
canGreenThumbPlants = RankUtils.hasUnlockedSubskill(player, SubSkillType.HERBALISM_GREEN_THUMB) && Permissions.greenThumbPlant(player, Material.WHEAT) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.BEETROOT) || Permissions.greenThumbPlant(player, Material.NETHER_WART) || Permissions.greenThumbPlant(player, Material.COCOA); canGreenThumbPlants = RankUtils.hasUnlockedSubskill(player, SubSkillType.HERBALISM_GREEN_THUMB) && (Permissions.greenThumbPlant(player, Material.WHEAT) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.BEETROOT) || Permissions.greenThumbPlant(player, Material.NETHER_WART) || Permissions.greenThumbPlant(player, Material.COCOA));
canGreenThumbBlocks = RankUtils.hasUnlockedSubskill(player, SubSkillType.HERBALISM_GREEN_THUMB) && Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLESTONE_WALL) || Permissions.greenThumbBlock(player, Material.STONE_BRICKS); canGreenThumbBlocks = RankUtils.hasUnlockedSubskill(player, SubSkillType.HERBALISM_GREEN_THUMB) && (Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLESTONE_WALL) || Permissions.greenThumbBlock(player, Material.STONE_BRICKS));
canFarmersDiet = canUseSubskill(player, SubSkillType.HERBALISM_FARMERS_DIET); canFarmersDiet = canUseSubskill(player, SubSkillType.HERBALISM_FARMERS_DIET);
canDoubleDrop = canUseSubskill(player, SubSkillType.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled(); canDoubleDrop = canUseSubskill(player, SubSkillType.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
canShroomThumb = canUseSubskill(player, SubSkillType.HERBALISM_SHROOM_THUMB); canShroomThumb = canUseSubskill(player, SubSkillType.HERBALISM_SHROOM_THUMB);

View File

@ -71,9 +71,9 @@ public class MiningCommand extends SkillCommand {
@Override @Override
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
canBiggerBombs = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.biggerBombs(player); canBiggerBombs = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BIGGER_BOMBS) && Permissions.biggerBombs(player);
canBlast = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(player); canBlast = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(player);
canDemoExpert = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.demolitionsExpertise(player); canDemoExpert = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_DEMOLITIONS_EXPERTISE) && Permissions.demolitionsExpertise(player);
canDoubleDrop = Permissions.isSubSkillEnabled(player, SubSkillType.MINING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled(); canDoubleDrop = Permissions.isSubSkillEnabled(player, SubSkillType.MINING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
canSuperBreaker = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_SUPER_BREAKER) && Permissions.superBreaker(player); canSuperBreaker = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_SUPER_BREAKER) && Permissions.superBreaker(player);
} }

View File

@ -50,8 +50,8 @@ public enum SubSkillType {
MINING_DOUBLE_DROPS, MINING_DOUBLE_DROPS,
MINING_SUPER_BREAKER(1), MINING_SUPER_BREAKER(1),
MINING_BLAST_MINING(8), MINING_BLAST_MINING(8),
MINING_BIGGER_BOMBS, MINING_BIGGER_BOMBS(1),
MINING_DEMOLITIONS_EXPERTISE, MINING_DEMOLITIONS_EXPERTISE(1),
/* Repair */ /* Repair */
REPAIR_ARCANE_FORGING, REPAIR_ARCANE_FORGING,

View File

@ -211,6 +211,18 @@ Mining:
Rank_1: 10 Rank_1: 10
RetroMode: RetroMode:
Rank_1: 100 Rank_1: 100
# For now make sure rank 1 is the same as blast mining rank 1, it's a bit hacky, I'll fix it later
BiggerBombs:
Standard:
Rank_1: 10
RetroMode:
Rank_1: 100
# For now make sure rank 1 is the same as blast mining rank 1, it's a bit hacky, I'll fix it later
DemolitionsExpertise:
Standard:
Rank_1: 10
RetroMode:
Rank_1: 100
BlastMining: BlastMining:
Standard: Standard:
Rank_1: 10 Rank_1: 10