Fix for PowerLossEvent Messages
This commit is contained in:
parent
6eb23a200e
commit
efcf97d375
@ -89,17 +89,17 @@ public class FactionsEntityListener implements Listener
|
|||||||
// call Event
|
// call Event
|
||||||
Bukkit.getPluginManager().callEvent(powerLossEvent);
|
Bukkit.getPluginManager().callEvent(powerLossEvent);
|
||||||
|
|
||||||
|
// Call player onDeath if the event is not cancelled
|
||||||
|
if(!powerLossEvent.isCancelled())
|
||||||
|
{
|
||||||
|
fplayer.onDeath();
|
||||||
|
}
|
||||||
// Send the message from the powerLossEvent
|
// Send the message from the powerLossEvent
|
||||||
final String msg = powerLossEvent.getMessage();
|
final String msg = powerLossEvent.getMessage();
|
||||||
if (msg != null && !msg.isEmpty())
|
if (msg != null && !msg.isEmpty())
|
||||||
{
|
{
|
||||||
fplayer.msg(msg,fplayer.getPowerRounded(),fplayer.getPowerMaxRounded());
|
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)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
|
Loading…
Reference in New Issue
Block a user