From efcf97d375106629dee6d00a833bd7b54c610c4d Mon Sep 17 00:00:00 2001 From: alkarin Date: Mon, 17 Dec 2012 11:43:57 -0600 Subject: [PATCH] Fix for PowerLossEvent Messages --- .../factions/listeners/FactionsEntityListener.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index 93701dd6..0cb77c36 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -89,17 +89,17 @@ public class FactionsEntityListener implements Listener // call Event Bukkit.getPluginManager().callEvent(powerLossEvent); + // Call player onDeath if the event is not cancelled + if(!powerLossEvent.isCancelled()) + { + fplayer.onDeath(); + } // Send the message from the powerLossEvent final String msg = powerLossEvent.getMessage(); if (msg != null && !msg.isEmpty()) { fplayer.msg(msg,fplayer.getPowerRounded(),fplayer.getPowerMaxRounded()); } - // Call player onDeath if the event is not cancelled - if(!powerLossEvent.isCancelled()) - { - fplayer.onDeath(); - } } @EventHandler(priority = EventPriority.NORMAL)