Very first implementation of JaninoNpcScript

This commit is contained in:
bigguy345 committed 2026-01-14 00:24:38 +02:00
1 parent cc0959dcfe
commit 54d0fe2b1b
5 files changed
+148 -1

No files matched your search

@@ -0,0 +1,22 @@
package noppes.npcs.janino.annotations;
import noppes.npcs.constants.EnumScriptType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to mark script hook methods and associate them with their EnumScriptType.
* Used by JaninoScript to automatically build a map of hook types to methods.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ScriptHook {
/**
* The script type(s) this method handles.
* Multiple types can be specified for methods that handle multiple hooks.
*/
EnumScriptType[] value();
}