These duplicate checks are handled in config validation.

This commit is contained in:
t00thpick1 2013-09-12 20:52:15 -04:00
parent 5c2b523f7a
commit 1004e2a32b

View File

@ -16,10 +16,6 @@ public final class HardcoreManager {
public static void invokeStatPenalty(Player player) { public static void invokeStatPenalty(Player player) {
double statLossPercentage = Config.getInstance().getHardcoreDeathStatPenaltyPercentage(); double statLossPercentage = Config.getInstance().getHardcoreDeathStatPenaltyPercentage();
if (statLossPercentage <= 0 || statLossPercentage > 100) {
return;
}
McMMOPlayerDeathPenaltyEvent eventToFire = new McMMOPlayerDeathPenaltyEvent(player); McMMOPlayerDeathPenaltyEvent eventToFire = new McMMOPlayerDeathPenaltyEvent(player);
mcMMO.p.getServer().getPluginManager().callEvent(eventToFire); mcMMO.p.getServer().getPluginManager().callEvent(eventToFire);
@ -49,10 +45,6 @@ public final class HardcoreManager {
public static void invokeVampirism(Player killer, Player victim) { public static void invokeVampirism(Player killer, Player victim) {
double vampirismStatLeechPercentage = Config.getInstance().getHardcoreVampirismStatLeechPercentage(); double vampirismStatLeechPercentage = Config.getInstance().getHardcoreVampirismStatLeechPercentage();
if (vampirismStatLeechPercentage <= 0 || vampirismStatLeechPercentage > 100) {
return;
}
McMMOPlayerDeathPenaltyEvent eventToFire = new McMMOPlayerDeathPenaltyEvent(victim); McMMOPlayerDeathPenaltyEvent eventToFire = new McMMOPlayerDeathPenaltyEvent(victim);
mcMMO.p.getServer().getPluginManager().callEvent(eventToFire); mcMMO.p.getServer().getPluginManager().callEvent(eventToFire);