IceBridge item no longer droppable

This commit is contained in:
Sam 2016-07-19 20:48:36 +01:00
parent 63a0eebd02
commit 0390822fd7

View File

@ -9,8 +9,10 @@ import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
@ -114,4 +116,19 @@ public class PerkIceBridge extends Perk
}
}
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event)
{
Iterator<ItemStack> iterator = event.getDrops().iterator();
while (iterator.hasNext())
{
ItemStack itemStack = iterator.next();
if (itemStack.getType() == Material.SNOW_BLOCK)
{
iterator.remove();
}
}
}
}