diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java index 4cc2f17..bfde552 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java @@ -37,10 +37,9 @@ 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.EntityExplodeEvent; -import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.block.BlockDispenseEvent; import org.bukkit.event.block.BlockFromToEvent; +import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.SpawnerSpawnEvent; @@ -49,9 +48,9 @@ import org.bukkit.event.inventory.FurnaceSmeltEvent; import org.bukkit.event.player.*; import org.bukkit.event.weather.WeatherChangeEvent; import org.bukkit.event.world.WorldLoadEvent; +import org.bukkit.inventory.ItemStack; import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; -import org.bukkit.inventory.ItemStack; public class Permanent implements Listener { @@ -150,10 +149,10 @@ public class Permanent implements Listener { } @EventHandler - public void onDropPickup(EntityPickupItemEvent e) { - if(!(e.getEntity() instanceof Player) || !(Config.ArenaRegion.inRegion(e.getItem().getLocation()))) + public void onDropPickup(PlayerPickupItemEvent e) { + if(!(Config.ArenaRegion.inRegion(e.getItem().getLocation()))) return; - Player player = (Player) e.getEntity(); + Player player = e.getPlayer(); ItemStack stack = e.getItem().getItemStack(); if(Config.PersonalKits) {