Archery skills do not show stats until unlocked

This commit is contained in:
nossr50 2019-01-15 02:54:51 -08:00
parent 6cc6de6e82
commit 086e29c4ac

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.archery.Archery; import com.gmail.nossr50.skills.archery.Archery;
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;
@ -52,7 +53,7 @@ public class ArcheryCommand extends SkillCommand {
@Override @Override
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
canSkillShot = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_SKILL_SHOT); canSkillShot = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_SKILL_SHOT) && RankUtils.hasUnlockedSubskill(player, SubSkillType.ARCHERY_SKILL_SHOT);
canDaze = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_DAZE); canDaze = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_DAZE);
canRetrieve = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_ARROW_RETRIEVAL); canRetrieve = Permissions.isSubSkillEnabled(player, SubSkillType.ARCHERY_ARROW_RETRIEVAL);
} }