Update ChestLinkStorage.java

Don't need to wait a tick. Just run it immediately with Scheduler.
This commit is contained in:
jameslfc19 2020-07-14 22:57:26 +01:00
parent f3c04c0783
commit b897c6a915

View File

@ -149,7 +149,7 @@ public class ChestLinkStorage extends AbstractStorage implements ConfigurationSe
InventoryHolder inventoryHolder = getInventory().getHolder();
if(inventoryHolder instanceof VirtualInventoryHolder){
((VirtualInventoryHolder) inventoryHolder).setPreviousInventory(() -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(ChestsPlusPlus.PLUGIN, () -> ChestLinkMenu.getMenu(player).open(player), 1);
Bukkit.getScheduler().runTask(ChestsPlusPlus.PLUGIN, () -> ChestLinkMenu.getMenu(player).open(player));
});
}
Utils.openChestInventory(player,getInventory());