@EventHandler
public void onInventoryClick(InventoryClickEvent event)
{
if (event.getWhoClicked() instanceof Player)
{
Player player = (Player) event.getWhoClicked();
AbstractGui gui = (AbstractGui) this.hub.getGuiManager().getPlayerGui(player);
if (event.getClickedInventory() instanceof PlayerInventory)
{
this.hub.getPlayerManager().getStaticInventory().doInteraction(player, event.getCurrentItem());
return;
}
if (gui != null)
{
String action = gui.getAction(event.getSlot());
if (action != null)
gui.onClick(player, event.getCurrentItem(), action, event.getClick());
}
}
}
GuiListener.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Hub
作者:
评论列表
文章目录