Fix for death event and hotbar items removing inventory drops.

This commit is contained in:
TinyTank800 2024-02-15 20:17:02 -08:00
parent c48779291d
commit 388c7d7a4b

View File

@ -83,7 +83,7 @@ public class UtilsOpenWithItem implements Listener {
//a new list instance has to be created with the dropped items to avoid ConcurrentModificationException
for(ItemStack s : new ArrayList<>(e.getDrops())){
try {
if (plugin.nbt.getNBT(s, "CommandPanelsHotbar") != null) {
if (!plugin.nbt.getNBT(s, "CommandPanelsHotbar").isEmpty()) {
//do not remove items that are not stationary
if(!plugin.nbt.getNBT(s, "CommandPanelsHotbar").endsWith("-1")) {
e.getDrops().remove(s);