mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-26 20:16:16 +01:00
Fix NullPointerException
This commit is contained in:
parent
556ef481a2
commit
1379ce344a
@ -78,7 +78,7 @@ public abstract class BaseIconMenu implements IconMenu {
|
|||||||
public void refreshOpenInventories() {
|
public void refreshOpenInventories() {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
DefaultItemInventory itemInventory = MenuManager.getOpenItemInventory(player);
|
DefaultItemInventory itemInventory = MenuManager.getOpenItemInventory(player);
|
||||||
if (itemInventory.getIconMenu() == this) {
|
if (itemInventory != null && itemInventory.getIconMenu() == this) {
|
||||||
itemInventory.refresh();
|
itemInventory.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user