This commit is contained in:
GJ 2012-05-24 10:30:07 -04:00
parent 2b469c385c
commit c40e4ee9ee

View File

@ -2,6 +2,7 @@ package com.gmail.nossr50.listeners;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.PlayerDeathEvent;
@ -11,8 +12,13 @@ import com.gmail.nossr50.util.Permissions;
public class HardcoreListener implements Listener { 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 Player player = event.getEntity(); //Note this returns a Player object for this subevent
if (!Permissions.getInstance().hardcoremodeBypass(player)) { if (!Permissions.getInstance().hardcoremodeBypass(player)) {
@ -21,6 +27,7 @@ public class HardcoreListener implements Listener {
Hardcore.invokeVampirism(((Player)player.getKiller()), player); Hardcore.invokeVampirism(((Player)player.getKiller()), player);
} }
} }
Hardcore.invokeStatPenalty(player); Hardcore.invokeStatPenalty(player);
} }
} }