Allow spells to be learned from double chests
This commit is contained in:
parent
181f360f11
commit
941be75161
@ -1123,8 +1123,16 @@ public class Wizards extends SoloGame
|
||||
@EventHandler
|
||||
public void onClick(InventoryClickEvent event)
|
||||
{
|
||||
if (event.getClickedInventory() == null || !(event.getClickedInventory().getHolder() instanceof BlockState))
|
||||
if (event.getClickedInventory() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
InventoryHolder holder = event.getClickedInventory().getHolder();
|
||||
// DoubleChests aren't a BlockState as they represent more than one block
|
||||
if (!(holder instanceof BlockState || holder instanceof DoubleChest))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack item = event.getCurrentItem();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user