diff --git a/src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java b/src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java index b394336c9..f7c1a22a0 100644 --- a/src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.listeners; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; @@ -10,17 +11,23 @@ import com.gmail.nossr50.util.Hardcore; import com.gmail.nossr50.util.Permissions; public class HardcoreListener implements Listener { - - @EventHandler() - public void PlayerDeathEvent(PlayerDeathEvent event) { + + /** + * Monitor PlayerDeath events. + * + * @param event The event to monitor + */ + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerDeath(PlayerDeathEvent event) { Player player = event.getEntity(); //Note this returns a Player object for this subevent - - if(!Permissions.getInstance().hardcoremodeBypass(player)) { - if(player.getKiller() instanceof Player) { - if(Config.getInstance().getHardcoreVampirismEnabled()) { + + if (!Permissions.getInstance().hardcoremodeBypass(player)) { + if (player.getKiller() instanceof Player) { + if (Config.getInstance().getHardcoreVampirismEnabled()) { Hardcore.invokeVampirism(((Player)player.getKiller()), player); } } + Hardcore.invokeStatPenalty(player); } }