Removed dropped exp from entity kills and fishing
This commit is contained in:
parent
c4d5ed4cbd
commit
b8d160388f
@ -17,6 +17,7 @@ import org.bukkit.event.Listener;
|
|||||||
import org.bukkit.event.block.*;
|
import org.bukkit.event.block.*;
|
||||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||||
import org.bukkit.event.inventory.FurnaceSmeltEvent;
|
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)
|
public boolean shouldBlock(Player player)
|
||||||
{
|
{
|
||||||
return player.getGameMode() != GameMode.CREATIVE;
|
return player.getGameMode() != GameMode.CREATIVE;
|
||||||
|
Loading…
Reference in New Issue
Block a user