Added an event hook for the scripted command event

This commit is contained in:
Goodbird committed 2024-01-20 12:17:15 +03:00
1 parent 1cdeb34953
commit 1421f9e819
1 file changed
+7
@@ -568,6 +568,13 @@ public class EventHooks {
return false;
}
public static void onScriptedCommand(CustomNPCsEvent.ScriptedCommandEvent event) {
ForgeDataScript handler = ScriptController.Instance.forgeScripts;
if (handler.isEnabled()) {
handler.callScript(EnumScriptType.SCRIPT_COMMAND, event);
}
}
public static void onCustomGuiButton(IPlayer player, ICustomGui gui, int buttonId) {
CustomGuiEvent.ButtonEvent event = new CustomGuiEvent.ButtonEvent(player, gui, buttonId);
CustomGuiController.onButton(event);