#use anvil gui to take a string
1 messages · Page 1 of 1 (latest)
sign is a good idea thank i think i make it so when i add a item manual i was kicked with error packet proccessing error and i cant type anything in the anvil
hmmm
lemme think, this should definetly be possible
problem is if you create and then add the item in I guess
because someone else putting an item in an anvil is normally not possible
i already try to place items in it with code but it doesnt work
the code i try:
p = player
Inventory createnew = Bukkit.createInventory(p, InventoryType.ANVIL, "§6LootChest || Name");
ItemStack name = new ItemStack(Material.NAME_TAG);
ItemMeta nameMeta = name.getItemMeta();
nameMeta.setDisplayName("Enter name of the chest!");
name.setItemMeta(nameMeta);
createnew.addItem(name);
createnew.setItem(0, name);
p.openInventory(createnew);
i think i cant type bc it is no item in it i see but i cant add manual an item not not with code
"it doesn't work"
what does that mean?
it doesnt give me any error in console and there is no item in the anvil gui
use the inventoryclickevent and print out the actual slot number of the slot that you want to change
it's probably not slot 0
but the problem when i click in the slot i got kicked with the error: packet proccessing error
erm pls show the code that makes you get kicked
i only create the inventory with the code:
p = player
Inventory createnew = Bukkit.createInventory(p, InventoryType.ANVIL, "§6LootChest || Name");
ItemStack name = new ItemStack(Material.NAME_TAG);
ItemMeta nameMeta = name.getItemMeta();
nameMeta.setDisplayName("Enter name of the chest!");
name.setItemMeta(nameMeta);
createnew.addItem(name);
createnew.setItem(0, name);
p.openInventory(createnew);
and i open it with a command and then i get kicken when i click in the slots with the erro packet proccessing error
(when i set no item it is the same)
my english is not the best sorry