mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 18:43:43 +01:00 
			
		
		
		
	Excavation hides stats until skills are unlocked
This commit is contained in:
		@@ -5,6 +5,7 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			|||||||
import com.gmail.nossr50.locale.LocaleLoader;
 | 
					import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.TextComponentFactory;
 | 
					import com.gmail.nossr50.util.TextComponentFactory;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
import net.md_5.bungee.api.chat.TextComponent;
 | 
					import net.md_5.bungee.api.chat.TextComponent;
 | 
				
			||||||
import org.bukkit.entity.Player;
 | 
					import org.bukkit.entity.Player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -34,8 +35,8 @@ public class ExcavationCommand extends SkillCommand {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void permissionsCheck(Player player) {
 | 
					    protected void permissionsCheck(Player player) {
 | 
				
			||||||
        canGigaDrill = Permissions.gigaDrillBreaker(player);
 | 
					        canGigaDrill = Permissions.gigaDrillBreaker(player) && RankUtils.hasUnlockedSubskill(player, SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER);
 | 
				
			||||||
        canTreasureHunt = Permissions.isSubSkillEnabled(player, SubSkillType.EXCAVATION_TREASURE_HUNTER);
 | 
					        canTreasureHunt = Permissions.isSubSkillEnabled(player, SubSkillType.EXCAVATION_TREASURE_HUNTER) && RankUtils.hasUnlockedSubskill(player, SubSkillType.EXCAVATION_TREASURE_HUNTER);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,8 +27,8 @@ public enum SubSkillType {
 | 
				
			|||||||
    AXES_SKULL_SPLITTER(1),
 | 
					    AXES_SKULL_SPLITTER(1),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Excavation */
 | 
					    /* Excavation */
 | 
				
			||||||
    EXCAVATION_TREASURE_HUNTER,
 | 
					    EXCAVATION_TREASURE_HUNTER(8),
 | 
				
			||||||
    EXCAVATION_GIGA_DRILL_BREAKER(0),
 | 
					    EXCAVATION_GIGA_DRILL_BREAKER(1),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Fishing */
 | 
					    /* Fishing */
 | 
				
			||||||
    FISHING_FISHERMANS_DIET,
 | 
					    FISHING_FISHERMANS_DIET,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -372,3 +372,28 @@ Woodcutting:
 | 
				
			|||||||
            Rank_1: 150
 | 
					            Rank_1: 150
 | 
				
			||||||
            Rank_2: 350
 | 
					            Rank_2: 350
 | 
				
			||||||
            Rank_3: 650
 | 
					            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
 | 
				
			||||||
		Reference in New Issue
	
	Block a user