mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +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<>();
|
List<String> lockedPartyFeatures = new ArrayList<>();
|
||||||
|
|
||||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||||
if (!partyFeature.hasPermission(player)) {
|
if (!partyFeature.hasPermission(pluginRef, player)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ public class ConfigLeveling {
|
|||||||
case SALVAGE:
|
case SALVAGE:
|
||||||
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().getLevelCap();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().getLevelCap();
|
||||||
default:
|
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;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ public class ConfigLeveling {
|
|||||||
case SALVAGE:
|
case SALVAGE:
|
||||||
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().isLevelCapEnabled();
|
return configSectionLevelCaps.getConfigSectionSkillLevelCaps().getSalvage().isLevelCapEnabled();
|
||||||
default:
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.datatypes.party;
|
package com.gmail.nossr50.datatypes.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public enum PartyFeature {
|
public enum PartyFeature {
|
||||||
@ -10,7 +11,8 @@ public enum PartyFeature {
|
|||||||
ITEM_SHARE,
|
ITEM_SHARE,
|
||||||
XP_SHARE;
|
XP_SHARE;
|
||||||
|
|
||||||
public boolean hasPermission(Player player) {
|
//TODO: hacky...
|
||||||
|
public boolean hasPermission(mcMMO pluginRef, Player player) {
|
||||||
PartySubcommandType partySubCommandType;
|
PartySubcommandType partySubCommandType;
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case CHAT:
|
case CHAT:
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
|
|
||||||
public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||||
private SubSkillType subSkillType;
|
private final SubSkillType subSkillType;
|
||||||
private boolean cancelled = false;
|
private boolean cancelled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +26,7 @@ public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable
|
|||||||
|
|
||||||
public SubSkillEvent(Player player, AbstractSubSkill abstractSubSkill) {
|
public SubSkillEvent(Player player, AbstractSubSkill abstractSubSkill) {
|
||||||
super(player, abstractSubSkill.getPrimarySkill());
|
super(player, abstractSubSkill.getPrimarySkill());
|
||||||
|
this.subSkillType = abstractSubSkill.getSubSkillType();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.events.skills.secondaryabilities;
|
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.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -7,8 +8,9 @@ import org.bukkit.entity.Player;
|
|||||||
public class SubSkillRandomCheckEvent extends SubSkillEvent {
|
public class SubSkillRandomCheckEvent extends SubSkillEvent {
|
||||||
private double chance;
|
private double chance;
|
||||||
|
|
||||||
public SubSkillRandomCheckEvent(Player player, SubSkillType ability, double chance) {
|
@Deprecated
|
||||||
super(player, ability);
|
public SubSkillRandomCheckEvent(Player player, SubSkillType subSkillType, double chance, PrimarySkillType primarySkillType) {
|
||||||
|
super(player, subSkillType, primarySkillType);
|
||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public final class MobHealthBarManager {
|
|||||||
target.setMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY, new FixedMetadataValue(pluginRef, false));
|
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) {
|
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();
|
return !event.isCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user