From d8483c70eec15648cd41159992be0a163616547d Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 28 Nov 2016 02:20:39 +1300 Subject: [PATCH] Fix an error --- .../utilities/packetlisteners/PacketListenerInventory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerInventory.java b/src/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerInventory.java index f84c3b61..7e574eb6 100644 --- a/src/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerInventory.java +++ b/src/me/libraryaddict/disguise/utilities/packetlisteners/PacketListenerInventory.java @@ -1,6 +1,7 @@ package me.libraryaddict.disguise.utilities.packetlisteners; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; @@ -293,10 +294,10 @@ public class PacketListenerInventory extends PacketAdapter { } } else if (event.getPacketType() == Server.WINDOW_ITEMS) { - event.setPacket(event.getPacket().deepClone()); + event.setPacket(event.getPacket().shallowClone()); StructureModifier> mods = event.getPacket().getItemListModifier(); - List items = mods.read(0); + List items = new ArrayList(mods.read(0)); for (int slot = 0; slot < items.size(); slot++) { if (slot >= 5 && slot <= 8) {