mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
These duplicate checks are handled in config validation.
This commit is contained in:
parent
5c2b523f7a
commit
1004e2a32b
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user