diff --git a/src/main/java/com/songoda/epicfurnaces/gui/GUIOverview.java b/src/main/java/com/songoda/epicfurnaces/gui/GUIOverview.java index bfc6d4d..bec02ca 100644 --- a/src/main/java/com/songoda/epicfurnaces/gui/GUIOverview.java +++ b/src/main/java/com/songoda/epicfurnaces/gui/GUIOverview.java @@ -189,7 +189,10 @@ public class GUIOverview extends Gui { } private void runTask() { - task = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, this::constructGUI, 5L, 5L); + task = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () -> { + if (inventory.getViewers().size() != 0) + this.constructGUI(); + }, 5L, 5L); } List getFurnaceDescription(Furnace furnace, Level level, Level nextLevel) {