Excavation hides stats until skills are unlocked

This commit is contained in:
nossr50 2019-01-15 03:05:42 -08:00
parent 61d87eff10
commit 427d8c3b21
3 changed files with 31 additions and 5 deletions

View File

@ -5,6 +5,7 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.TextComponentFactory;
import com.gmail.nossr50.util.skills.RankUtils;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.entity.Player;
@ -34,8 +35,8 @@ public class ExcavationCommand extends SkillCommand {
@Override
protected void permissionsCheck(Player player) {
canGigaDrill = Permissions.gigaDrillBreaker(player);
canTreasureHunt = Permissions.isSubSkillEnabled(player, SubSkillType.EXCAVATION_TREASURE_HUNTER);
canGigaDrill = Permissions.gigaDrillBreaker(player) && RankUtils.hasUnlockedSubskill(player, SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER);
canTreasureHunt = Permissions.isSubSkillEnabled(player, SubSkillType.EXCAVATION_TREASURE_HUNTER) && RankUtils.hasUnlockedSubskill(player, SubSkillType.EXCAVATION_TREASURE_HUNTER);
}
@Override

View File

@ -27,8 +27,8 @@ public enum SubSkillType {
AXES_SKULL_SPLITTER(1),
/* Excavation */
EXCAVATION_TREASURE_HUNTER,
EXCAVATION_GIGA_DRILL_BREAKER(0),
EXCAVATION_TREASURE_HUNTER(8),
EXCAVATION_GIGA_DRILL_BREAKER(1),
/* Fishing */
FISHING_FISHERMANS_DIET,

View File

@ -372,3 +372,28 @@ Woodcutting:
Rank_1: 150
Rank_2: 350
Rank_3: 650
Excavation:
GigaDrillBreaker:
Standard:
Rank_1: 10
RetroMode:
Rank_1: 100
TreasureHunter:
Standard:
Rank_1: 10
Rank_2: 25
Rank_3: 35
Rank_4: 50
Rank_5: 65
Rank_6: 75
Rank_7: 85
Rank_8: 100
RetroMode:
Rank_1: 100
Rank_2: 250
Rank_3: 350
Rank_4: 500
Rank_5: 650
Rank_6: 750
Rank_7: 850
Rank_8: 1000