This commit is contained in:
GeorgH93 2017-02-11 13:48:45 +01:00
parent b0c098a508
commit 77e152077b
2 changed files with 3 additions and 1 deletions

View File

@ -188,6 +188,8 @@ public List<ItemStack> setSize(int newSize)
{ {
bp.setItem(i, itemStackArray[i]); bp.setItem(i, itemStackArray[i]);
} }
setChanged();
save(); // Make sure the new inventory is saved
size = newSize; size = newSize;
for(Entry<Player, Boolean> e : opened.entrySet()) for(Entry<Player, Boolean> e : opened.entrySet())
{ {

View File

@ -61,7 +61,7 @@ public void onInventoryClick(InventoryClickEvent event)
@EventHandler(ignoreCancelled = true) @EventHandler(ignoreCancelled = true)
public void onInventoryOpen(InventoryOpenEvent event) public void onInventoryOpen(InventoryOpenEvent event)
{ {
if(event.getInventory().getHolder().getClass().getName().toLowerCase().contains("shulker")) if(event.getInventory() != null && event.getInventory().getHolder() != null && event.getInventory().getHolder().getClass().getName().toLowerCase().contains("shulker"))
{ {
event.setCancelled(true); event.setCancelled(true);
} }