mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
time to cut some corners :sick:
This commit is contained in:
@ -232,8 +232,37 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
|
||||
protected abstract void dataCalculations(Player player, double skillValue);
|
||||
|
||||
protected String getLimitBreakDescriptionParameter() {
|
||||
if(AdvancedConfig.getInstance().canApplyLimitBreakPVE()) {
|
||||
protected String getLimitBreakDescriptionParameter(SubSkillType subSkillType) {
|
||||
//TODO: Hacky gross code below
|
||||
|
||||
boolean pveAllowed = false;
|
||||
|
||||
switch(subSkillType) {
|
||||
case ARCHERY_ARCHERY_LIMIT_BREAK:
|
||||
if(pluginRef.getConfigManager().getConfigArchery().getLimitBreak().isEnabledForPVE()) {
|
||||
pveAllowed = true;
|
||||
}
|
||||
break;
|
||||
case AXES_AXES_LIMIT_BREAK:
|
||||
if(pluginRef.getConfigManager().getConfigAxes().getSubSkills().getConfigAxesLimitBreak().isEnabledForPVE()) {
|
||||
pveAllowed = true;
|
||||
}
|
||||
break;
|
||||
case SWORDS_SWORDS_LIMIT_BREAK:
|
||||
if(pluginRef.getConfigManager().getConfigSwords().getSubSkills().getSwordsLimitBreak().isEnabledForPVE()) {
|
||||
pveAllowed = true;
|
||||
}
|
||||
break;
|
||||
case UNARMED_UNARMED_LIMIT_BREAK:
|
||||
if(pluginRef.getConfigManager().getConfigUnarmed().getSubSkills().getUnarmedLimitBreak().isEnabledForPVE()) {
|
||||
pveAllowed = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pluginRef.getLogger().severe("This skill has no limit break PVE setting defined!");
|
||||
}
|
||||
|
||||
if(pveAllowed) {
|
||||
return "(PVP/PVE)";
|
||||
} else {
|
||||
return "(PVP)";
|
||||
|
Reference in New Issue
Block a user