Skip to content

Commit

Permalink
fix critical bug, sometimes reverted shulker content is not properly …
Browse files Browse the repository at this point in the history
…copied
  • Loading branch information
crxyne committed May 12, 2024
1 parent b35d23b commit 4d42f4b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
import org.zeroBzeroT.antiillegals.helpers.InventoryHolderHelper;

import java.util.Objects;

Expand All @@ -24,6 +25,7 @@ public void applyRevertedState(@NotNull final ItemStack cached) {
if (revertedState == ItemState.CLEAN) return; // nothing to change

cached.setItemMeta(revertedStack.getItemMeta());
InventoryHolderHelper.copyInventoryContents(revertedStack, cached);
cached.setDurability(revertedStack.getDurability());
cached.setData(revertedStack.getData());
cached.setAmount(revertedStack.getAmount());
Expand Down

0 comments on commit 4d42f4b

Please sign in to comment.