mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-01-27 10:41:31 +01:00
Update ChestLinkStorage.java
Don't need to wait a tick. Just run it immediately with Scheduler.
This commit is contained in:
parent
f3c04c0783
commit
b897c6a915
@ -149,7 +149,7 @@ public class ChestLinkStorage extends AbstractStorage implements ConfigurationSe
|
|||||||
InventoryHolder inventoryHolder = getInventory().getHolder();
|
InventoryHolder inventoryHolder = getInventory().getHolder();
|
||||||
if(inventoryHolder instanceof VirtualInventoryHolder){
|
if(inventoryHolder instanceof VirtualInventoryHolder){
|
||||||
((VirtualInventoryHolder) inventoryHolder).setPreviousInventory(() -> {
|
((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());
|
Utils.openChestInventory(player,getInventory());
|
||||||
|
Loading…
Reference in New Issue
Block a user