mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 08:09:39 +01:00
Squashing some final compiler errors from static abuse removal
This commit is contained in:
parent
8ad08298d0
commit
e8f14eece0
@ -68,7 +68,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
List<String> lockedPartyFeatures = new ArrayList<>();
|
||||
|
||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||
if (!partyFeature.hasPermission(player)) {
|
||||
if (!partyFeature.hasPermission(pluginRef, player)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user