use of com.github.sirblobman.combatlogx.api.event.PlayerPunishEvent in project CombatLogX by SirBlobman.
the class PunishManager method punish.
@Override
public boolean punish(Player player, UntagReason punishReason, LivingEntity previousEnemy) {
PlayerPunishEvent punishEvent = new PlayerPunishEvent(player, punishReason, previousEnemy);
PluginManager pluginManager = Bukkit.getPluginManager();
pluginManager.callEvent(punishEvent);
if (punishEvent.isCancelled()) {
return false;
}
increasePunishmentCount(player);
runKillCheck(player);
runPunishCommands(player, previousEnemy, this.punishCommandList);
runSpecialPunishments(player, previousEnemy);
return true;
}
Aggregations