[SPIGOT-692] Crash when interacting with artificial anvil inventory Created: 13/Mar/15  Updated: 25/Apr/16  Resolved: 25/Apr/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Adam Taylor Assignee: md_5
Resolution: Fixed Votes: 6
Labels: None
Environment:

Windows 8.1, Java 8 update 31



 Description   

My code creates a anvil inventory and shows it properly to the player, but when I try and interact by putting items in the anvil, it sends this crash report to the console

http://pastebin.com/QN9bj6qh



 Comments   
Comment by Fanghan [ 25/Apr/16 ]

Confirm Issue, somehow the anvil functions normally, but server keeps printing these exceptions.

Comment by Samuel Heasley [ 16/Apr/16 ]

Still present.

Comment by Herra Pilvinen [ 31/Mar/16 ]

Still present in 1.9.2

Comment by Benjami [ 30/Mar/16 ]

Still present in 1.9: http://hastebin.com/omawefuxeh.avrasm

Basically, I'm just creating and sending inventory using following code:
p.openInventory(Bukkit.createInventory(p, InventoryType.ANVIL));

Comment by JCThePants [ 26/Jun/15 ]

I'm also having this issue.

Inventory inventory = Bukkit.createInventory(player, InventoryType.ANVIL);
InventoryView view = player.openInventory(inventory);

It appears the anvil slots are not being setup in org.bukkit.craftbukkit.inventory.CraftContainer

see CraftContainer#setupSlots

Comment by Adam Taylor [ 24/Mar/15 ]

Inventory inv = Bukkit.createInventory(player, InventoryType.ANVIL, "Portable Anvil");
player.closeInventory();
player.openInventory(inv);

Comment by md_5 [ 13/Mar/15 ]

Please include sample code.

Generated at Sat Dec 13 20:46:13 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.