mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 02:29:41 +00:00
Implemented textfield unfocused event
This commit is contained in:
1 parent
2874643c84
commit
791adfc1b4
9 files changed
+50
-13
No files matched your search
@@ -83,6 +83,15 @@ public class CustomGuiController {
|
||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static void onCustomGuiUnfocused(CustomGuiEvent.UnfocusedEvent event) {
|
||||
EntityPlayer player = (EntityPlayer) event.player.getMCEntity();
|
||||
if (checkGui(event) && getOpenGui(player).getScriptHandler() != null) {
|
||||
getOpenGui(player).getScriptHandler().callScript(EnumScriptType.CUSTOM_GUI_TEXTFIELD, event);
|
||||
}
|
||||
|
||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static void onScrollClick(CustomGuiEvent.ScrollEvent event) {
|
||||
EntityPlayer player = (EntityPlayer) event.player.getMCEntity();
|
||||
if (checkGui(event) && getOpenGui(player).getScriptHandler() != null) {
|
||||
|
||||
Reference in new issue
Block a user