mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 02:34:10 +00:00
Added ScriptContext based registerHook
This commit is contained in:
1 parent
73f0d4e441
commit
cb364823a9
1 file changed
+10
-1
@@ -3,7 +3,6 @@ package noppes.npcs.controllers;
|
||||
import noppes.npcs.api.handler.IScriptHookHandler;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.constants.ScriptContext;
|
||||
import noppes.npcs.controllers.data.EffectScript;
|
||||
import noppes.npcs.controllers.data.RecipeScript;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -230,6 +229,16 @@ public class ScriptHookController implements IScriptHookHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHooks(ScriptContext context, String functionName) {
|
||||
registerHook(context.hookContext, functionName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHooks(ScriptContext context, String... functionNames) {
|
||||
registerHooks(context.hookContext, functionNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHook(String context, String functionName) {
|
||||
if (context == null || functionName == null || functionName.isEmpty()) {
|
||||
|
||||
Reference in new issue
Block a user