Fix NullPointer at GUI onClick() (#1064)
This commit is contained in:
parent
a42d4d1d50
commit
6f55243a80
@ -114,7 +114,10 @@ public class PermissableActionGUI implements InventoryHolder, PermissionGUI {
|
||||
public void onClick(int slot, ClickType click) {
|
||||
if (specialSlots.containsKey(slot)) {
|
||||
if (specialSlots.get(slot) == SpecialItem.BACK) {
|
||||
fme.getPlayer().openInventory(new PermissableRelationGUI(fme).getInventory());
|
||||
PermissableRelationGUI relationGUI = new PermissableRelationGUI(fme);
|
||||
relationGUI.build();
|
||||
|
||||
fme.getPlayer().openInventory(relationGUI.getInventory());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -87,7 +87,10 @@ public class PermissableRelationGUI implements InventoryHolder, PermissionGUI {
|
||||
return;
|
||||
}
|
||||
|
||||
fme.getPlayer().openInventory(new PermissableActionGUI(fme, relationSlots.get(slot)).getInventory());
|
||||
PermissableActionGUI actionGUI = new PermissableActionGUI(fme, relationSlots.get(slot));
|
||||
actionGUI.build();
|
||||
|
||||
fme.getPlayer().openInventory(actionGUI.getInventory());
|
||||
}
|
||||
|
||||
private Permissable getPermissable(String name) {
|
||||
|
Loading…
Reference in New Issue
Block a user