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