mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-27 02:58:03 +01:00
Cleanup.
This commit is contained in:
parent
2b469c385c
commit
c40e4ee9ee
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user