Fix an error

This commit is contained in:
libraryaddict 2016-11-28 02:20:39 +13:00
parent c9cbdc3c93
commit d8483c70ee

View File

@ -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<List<ItemStack>> mods = event.getPacket().getItemListModifier();
List<ItemStack> items = mods.read(0);
List<ItemStack> items = new ArrayList<ItemStack>(mods.read(0));
for (int slot = 0; slot < items.size(); slot++) {
if (slot >= 5 && slot <= 8) {