time to cut some corners :sick:

This commit is contained in:
nossr50 2019-09-23 12:40:00 -07:00
parent 9b6e6d7861
commit 810a29cb9d
2 changed files with 32 additions and 2 deletions

View File

@ -15,6 +15,7 @@ Version 2.2.0
Fixed a bug where salvage anvil noises wouldn't play for a player that lacked repair permissions nodes
Sharpened Claws now has settings to change its damage for PVE or PVP instead of a flat setting that applied to both
Gore tick length is now customizable
Limit Breaks are now configurable per skill instead of one shared setting across all limit breaks skills
Removed the following Repair/Salvage permissions
mcmmo.ability.repair.stonerepair
mcmmo.ability.repair.stringrepair

View File

@ -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)";