mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 16:59:37 +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.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,16 +12,22 @@ 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)) {
|
||||||
if(player.getKiller() instanceof Player) {
|
if (player.getKiller() instanceof Player) {
|
||||||
if(Config.getInstance().getHardcoreVampirismEnabled()) {
|
if (Config.getInstance().getHardcoreVampirismEnabled()) {
|
||||||
Hardcore.invokeVampirism(((Player)player.getKiller()), player);
|
Hardcore.invokeVampirism(((Player)player.getKiller()), player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Hardcore.invokeStatPenalty(player);
|
Hardcore.invokeStatPenalty(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user