+ fix MenuBuilder
This commit is contained in:
parent
c7573226a5
commit
b8084fe02e
@ -36,8 +36,8 @@ class ClickListener implements Listener {
|
||||
@EventHandler
|
||||
public void e(InventoryOpenEvent e) {
|
||||
if (e.getInventory().getHolder() instanceof MenuHolder) {
|
||||
Bukkit.getScheduler().runTask(TabooLib.getPlugin(), () -> ((MenuHolder) e.getInventory().getHolder()).getBuilder().open((OpenTask) -> e.getInventory()));
|
||||
Bukkit.getScheduler().runTaskAsynchronously(TabooLib.getPlugin(), () -> ((MenuHolder) e.getInventory().getHolder()).getBuilder().openAsync((OpenTask) -> e.getInventory()));
|
||||
Bukkit.getScheduler().runTask(TabooLib.getPlugin(), () -> ((MenuHolder) e.getInventory().getHolder()).getBuilder().getBuildTask().run(e.getInventory()));
|
||||
Bukkit.getScheduler().runTaskAsynchronously(TabooLib.getPlugin(), () -> ((MenuHolder) e.getInventory().getHolder()).getBuilder().getBuildTaskAsync().run(e.getInventory()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,14 @@ public class MenuBuilder {
|
||||
return closeTask;
|
||||
}
|
||||
|
||||
public BuildTask getBuildTask() {
|
||||
return buildTask;
|
||||
}
|
||||
|
||||
public BuildTask getBuildTaskAsync() {
|
||||
return buildTaskAsync;
|
||||
}
|
||||
|
||||
public boolean isLockHand() {
|
||||
return lockHand;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user