mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 20:49:05 +00:00
Hook Context
This commit is contained in:
1 parent
f4a5bbd1f6
commit
bee4d18bc6
6 files changed
+903
-198
No files matched your search
@@ -17,6 +17,7 @@ public class JaninoNpcScript extends JaninoScript<JaninoNpcScript.Functions> {
|
||||
/**
|
||||
* Default imports for NPC scripts.
|
||||
* These are automatically available in user code without explicit import statements.
|
||||
* Additional imports from registered hook definitions are added at compile time.
|
||||
*/
|
||||
private static final String[] DEFAULT_IMPORTS = {
|
||||
"noppes.npcs.api.event.INpcEvent",
|
||||
@@ -31,6 +32,11 @@ public class JaninoNpcScript extends JaninoScript<JaninoNpcScript.Functions> {
|
||||
super(Functions.class, DEFAULT_IMPORTS);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getHookContext() {
|
||||
return "npc";
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface defining the hook methods available for NPC scripts.
|
||||
* Each method corresponds to an NPC event from ScriptHookController CONTEXT_NPC.
|
||||
|
||||
Reference in new issue
Block a user