diff --git a/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java index ec79bdf3f..010dd1fbd 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java @@ -68,7 +68,7 @@ public class PartyInfoCommand implements CommandExecutor { List lockedPartyFeatures = new ArrayList<>(); for (PartyFeature partyFeature : PartyFeature.values()) { - if (!partyFeature.hasPermission(player)) { + if (!partyFeature.hasPermission(pluginRef, player)) { continue; } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java index 3f895cfe2..07633fc92 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java @@ -246,7 +246,7 @@ public class ConfigLeveling { case SALVAGE: return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().getLevelCap(); default: - pluginRef.getLogger().severe("No defined level cap for " + primarySkillType.toString() + " - Contact the mcMMO dev team!"); + System.out.println(("[mcMMO Debug LevelingConfig] No defined level cap for " + primarySkillType.toString() + " - Contact the mcMMO dev team!")); return Integer.MAX_VALUE; } } @@ -284,7 +284,7 @@ public class ConfigLeveling { case SALVAGE: return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().isLevelCapEnabled(); default: - pluginRef.getLogger().severe("No defined level cap for " + primarySkillType.toString() + " - Contact the mcMMO dev team!"); + System.out.println(("[mcMMO Debug LevelingConfig] No defined level cap for " + primarySkillType.toString() + " - Contact the mcMMO dev team!")); return false; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/party/PartyFeature.java b/src/main/java/com/gmail/nossr50/datatypes/party/PartyFeature.java index e5090bdc8..00e21a787 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/party/PartyFeature.java +++ b/src/main/java/com/gmail/nossr50/datatypes/party/PartyFeature.java @@ -1,6 +1,7 @@ package com.gmail.nossr50.datatypes.party; import com.gmail.nossr50.commands.party.PartySubcommandType; +import com.gmail.nossr50.mcMMO; import org.bukkit.entity.Player; public enum PartyFeature { @@ -10,7 +11,8 @@ public enum PartyFeature { ITEM_SHARE, XP_SHARE; - public boolean hasPermission(Player player) { + //TODO: hacky... + public boolean hasPermission(mcMMO pluginRef, Player player) { PartySubcommandType partySubCommandType; switch (this) { case CHAT: diff --git a/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillEvent.java b/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillEvent.java index 0134e4d22..dc7963a50 100644 --- a/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillEvent.java +++ b/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillEvent.java @@ -8,7 +8,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable { - private SubSkillType subSkillType; + private final SubSkillType subSkillType; private boolean cancelled = false; /** @@ -26,6 +26,7 @@ public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable public SubSkillEvent(Player player, AbstractSubSkill abstractSubSkill) { super(player, abstractSubSkill.getPrimarySkill()); + this.subSkillType = abstractSubSkill.getSubSkillType(); } /** diff --git a/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillRandomCheckEvent.java b/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillRandomCheckEvent.java index 32af79dde..f37e3052a 100644 --- a/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillRandomCheckEvent.java +++ b/src/main/java/com/gmail/nossr50/events/skills/secondaryabilities/SubSkillRandomCheckEvent.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.events.skills.secondaryabilities; +import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import org.bukkit.entity.Player; @@ -7,8 +8,9 @@ import org.bukkit.entity.Player; public class SubSkillRandomCheckEvent extends SubSkillEvent { private double chance; - public SubSkillRandomCheckEvent(Player player, SubSkillType ability, double chance) { - super(player, ability); + @Deprecated + public SubSkillRandomCheckEvent(Player player, SubSkillType subSkillType, double chance, PrimarySkillType primarySkillType) { + super(player, subSkillType, primarySkillType); this.chance = chance; } diff --git a/src/main/java/com/gmail/nossr50/util/MobHealthBarManager.java b/src/main/java/com/gmail/nossr50/util/MobHealthBarManager.java index 43c95c106..43b2a180c 100644 --- a/src/main/java/com/gmail/nossr50/util/MobHealthBarManager.java +++ b/src/main/java/com/gmail/nossr50/util/MobHealthBarManager.java @@ -80,7 +80,7 @@ public final class MobHealthBarManager { target.setMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY, new FixedMetadataValue(pluginRef, false)); } - new MobHealthDisplayUpdaterTask(target).runTaskLater(pluginRef, displayTime * pluginRef.getMiscTools().TICK_CONVERSION_FACTOR); // Clear health display after 3 seconds + new MobHealthDisplayUpdaterTask(pluginRef, target).runTaskLater(pluginRef, displayTime * pluginRef.getMiscTools().TICK_CONVERSION_FACTOR); // Clear health display after 3 seconds } } diff --git a/src/main/java/com/gmail/nossr50/util/random/RandomChanceTools.java b/src/main/java/com/gmail/nossr50/util/random/RandomChanceTools.java index 4e4a00bb6..39bcdc0ae 100644 --- a/src/main/java/com/gmail/nossr50/util/random/RandomChanceTools.java +++ b/src/main/java/com/gmail/nossr50/util/random/RandomChanceTools.java @@ -230,7 +230,7 @@ public class RandomChanceTools { } public boolean sendSkillEvent(Player player, SubSkillType subSkillType, double activationChance) { - SubSkillRandomCheckEvent event = new SubSkillRandomCheckEvent(player, subSkillType, activationChance); + SubSkillRandomCheckEvent event = new SubSkillRandomCheckEvent(player, subSkillType, activationChance, pluginRef.getSkillTools().getPrimarySkillBySubSkill(subSkillType)); return !event.isCancelled(); }