Removed dropped exp from entity kills and fishing

This commit is contained in:
Sam 2017-06-16 17:05:54 +01:00 committed by cnr
parent c4d5ed4cbd
commit b8d160388f

View File

@ -17,6 +17,7 @@ import org.bukkit.event.Listener;
import org.bukkit.event.block.*;
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.inventory.FurnaceSmeltEvent;
@ -229,6 +230,18 @@ public class WorldListeners implements Listener
}
}
@EventHandler
public void removeExp(EntityDeathEvent event)
{
event.setDroppedExp(0);
}
@EventHandler
public void removeExp(PlayerFishEvent event)
{
event.setExpToDrop(0);
}
public boolean shouldBlock(Player player)
{
return player.getGameMode() != GameMode.CREATIVE;