mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 13:29:43 +00:00
Added CustomGuiEvent.SlotClickEvent.
This commit is contained in:
1 parent
cc1c6c1910
commit
b45cad77dd
5 files changed
+55
No files matched your search
@@ -89,6 +89,14 @@ public class CustomGuiController {
|
||||
NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static boolean onSlotClick(CustomGuiEvent.SlotClickEvent event) {
|
||||
EntityPlayer player = (EntityPlayer) event.player.getMCEntity();
|
||||
if(checkGui(event) && getOpenGui(player).getScriptHandler()!=null) {
|
||||
(getOpenGui(player).getScriptHandler()).callScript(EnumScriptType.CUSTOM_GUI_SLOT_CLICKED, event);
|
||||
}
|
||||
return NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static void onCustomGuiUnfocused(CustomGuiEvent.UnfocusedEvent event) {
|
||||
EntityPlayer player = (EntityPlayer) event.player.getMCEntity();
|
||||
if (checkGui(event) && getOpenGui(player).getScriptHandler() != null) {
|
||||
|
||||
Reference in new issue
Block a user