IceBridge item no longer droppable
This commit is contained in:
parent
63a0eebd02
commit
0390822fd7
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user