mirror of
https://github.com/songoda/EpicFurnaces.git
synced 2024-12-02 23:03:36 +01:00
Make sure the inventory is open before running the task.
This commit is contained in:
parent
fa2c4b52e3
commit
58314408e0
@ -189,7 +189,10 @@ public class GUIOverview extends Gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void runTask() {
|
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<String> getFurnaceDescription(Furnace furnace, Level level, Level nextLevel) {
|
List<String> getFurnaceDescription(Furnace furnace, Level level, Level nextLevel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user