Discussion in 'Plugin Development' started by PlayFriik, Dec 3, 2014.
PlayFriik Why wouldn't you be able to take items out of it? Cancel the InventoryClickEvent when necessary.
Because I wanna make a shop thingy or what ever I want... This InventoryClickEvent disables absolutely all moving items, but I want that it disables only when I open the custom gui.
Check the inventory name, or some component that separates your gui from the rest
PlayFriik I said cancel it when necessary, not completely.
As Skionz said, cancel the InventoryClickEvent when necessary. Basically check if the inventory they click in is the custom one you created, than cancel all clicking in that inventory.
Check if event.getInventory().getName().equals("Test")
if it is, cancel it.
Thank you, it worked.
Separate names with a comma.