When a player dies does not drop into a specific item, the code works most of the error in the console can someone fix it @EventHandler public void EventNoDropITem(PlayerDeathEvent e) { for (ItemStack is : e.getDrops()) { if (is.getType() == Material.PORTAL) { e.getDrops().remove(is); } } }
Some more info would have been helpful, but I can tell you that there is a concurrent modification exception from your use of an enhanced for loop. You can't modify a list while iterating over it using for (item : list).
FlothersBR You missed the important part of the exception, but from what I saw, it is a concurrent modification exception. Use a regular for loop instead of an enhanced for loop if you are going to remove items from a list.