Commit Graph
3334 Commits
Author SHA1 Message Date
Kam 923c84e3fe Cache Handle for O(1) lookups 2026-01-22 19:03:28 -05:00
Kam ee593c62c0 No @ScriptHook needed anymore 2026-01-22 18:44:41 -05:00
Kam bee4d18bc6 Hook Context 2026-01-22 17:59:03 -05:00
Kam f4a5bbd1f6 Janino Kam 2026-01-22 17:28:12 -05:00
Kam 638c915965 Potential Fix to Usuable Type names 2026-01-22 16:59:13 -05:00
Kam 8da42e7b7c Merge branch 'janino-scripts' of https://github.com/KAMKEEL/CustomNPC-Plus into janino-scripts 2026-01-22 16:24:53 -05:00
Kam e6221c0940 Test Janino 2026-01-22 16:24:48 -05:00
bigguy345 dfcab1e413 Moved clear to ScriptHandler 2026-01-22 23:05:47 +02:00
bigguy345 13cb94d5e2 Forgot API ScriptHookController 2026-01-22 22:57:04 +02:00
bigguy345 a18292b8ed Used dynamic janino compiler for server side script handlers 2026-01-22 22:29:26 +02:00
bigguy345 cb364823a9 Added ScriptContext based registerHook 2026-01-22 22:28:20 +02:00
somehussar 73f0d4e441 Bought goatee some braincells
He lost his from AI usage.
2026-01-22 21:14:50 +01:00
Kam 9ed588728b Update ScriptForgeEventHandler.java 2026-01-22 15:04:44 -05:00
Kam 19b01e2099 Compress Script Hooks and Context System 2026-01-22 14:27:48 -05:00
bigguy345 e2ca76e626 Removed default imports for server event janino scripts 2026-01-22 21:02:24 +02:00
bigguy345 7050e9b7d4 Implemented Janino scripting for player events. via JaninoPlayerScript 2026-01-22 20:51:46 +02:00
bigguy345 d835d2acb0 Migrated all EffectScript.ScriptType hooks to EnumScriptType 2026-01-22 20:48:17 +02:00
bigguy345 50e9f1b3e5 HUGE IScriptHandlerPacket merge.
All ScriptHandlers that send packets now directly define their data through the ScriptHandler class itself, NOT through their own GuiScript extended class.
2026-01-22 20:05:07 +02:00
bigguy345 3f8373d76f Merge branch 'dev' into janino-scripts 2026-01-22 19:53:18 +02:00
Kam d0dc8a4578 Trader System + Stocks Implemented
- Removed Auction System Temporarily for Full Rebase
2026-01-22 12:38:56 -05:00
Kam 692b985237 Cleanup for Langs + Abilities 2026-01-20 23:50:42 -05:00
Kam 04e2a57cb4 Auction Merge 2026-01-20 21:07:18 -05:00
Kam 384b61832d Hitbox Fixes 2026-01-19 16:29:24 -05:00
bigguy345 4cb1eee017 Only showed language button in script tab when script supports multiple languages 2026-01-19 04:46:26 +02:00
bigguy345 f8c9faac0b - Implemented getLanguageOptions() with server-to-client fallback logic to ensure "Java/Janino" is correctly listed and synchronized in the script GUI.
- Renamed `getScriptIndex` to `getLanguageIndex` in `GuiScriptInterface` and its subclasses to resolve naming ambiguity between tabs and engine selection.
2026-01-19 04:06:11 +02:00
bigguy345 af62868387 1. JaninoHookResolver
2. Janino reflection based function calls like:

Color script = scriptHandler.callFunction("getColor", Color.class, ctx);

Compared to current:

Color script = scriptHandler.getScript().call(f -> f.getColor(ctx));
2026-01-19 03:26:02 +02:00
bigguy345 a032d24d65 Fixed crash 2026-01-19 03:18:41 +02:00
bigguy345 f5dbe19de2 New IScriptHandlerPacket:
- Defines the packet-backed script GUI contract used by GuiScriptInterface for “streamed” script loading/saving.

- Updated EffectScript, LinkedItemScript and RecipeScript to implement IScriptHandlerPacket

- Removed GuiScriptEffect, GuiScriptLinkedItem and GuiScriptRecipe as their functionality got replaced with new interface handled by GuiScriptInterface
2026-01-18 17:57:10 +02:00
bigguy345 eecb5b0b3b ScriptHandler refactor:
- ScriptHandler now holds a list of containers

- Delegated single container handling to SingleScriptHandler

IScriptHandler refactor:

- Moved ScriptContext/Hook logic to it

- More default methods + hooked them to GuIScriptInterface
2026-01-18 17:50:04 +02:00
bigguy345 44f71ddb81 Handled script language correctly for external script selector list + added forgotten singleContainer logic 2026-01-18 04:04:17 +02:00
bigguy345 86285ceff5 - New JaninoScriptHandler thats a concrete IScriptHandler impl and replaces JaninoScriptable
- Removed ScriptHandler based methods from JaninoScript
2026-01-18 03:26:31 +02:00
bigguy345 f829926f00 New ScriptHandler, which is an abstract IScriptHandler implementation 2026-01-18 03:19:30 +02:00
bigguy345 cda43fe67a Defaulted IScriptHandler methods to clean up duplicate code across implementations 2026-01-18 03:05:02 +02:00
bigguy345 68bc02a5d4 Removed SingleScriptHandler 2026-01-18 03:01:55 +02:00
bigguy345 f6e589ac67 temp SingleScriptHandlers tuff 2026-01-15 04:13:59 +02:00
bigguy345 23c44cc5d4 Refactor 2026-01-14 03:52:04 +02:00
bigguy345 2c2e13c2f7 Morea ScriptContainer -> IScriptUnit abstraction 2026-01-14 03:50:47 +02:00
bigguy345 d17534120b Merged GuiJaninoScript with GuiScriptInterface and moved usages 2026-01-14 03:41:24 +02:00
bigguy345 a44cc4f1bb Passed default imports to JaninoScript 2026-01-14 03:03:34 +02:00
bigguy345 54d0fe2b1b Very first implementation of JaninoNpcScript 2026-01-14 00:24:38 +02:00
bigguy345 cc0959dcfe Added run(EnumScriptType, Event) and
run(String, Event) methods to IScriptUnit interface, with JaninoScript
delegating to callByHookType(). This provides a cleaner abstraction that
supports both ScriptContainer and JaninoScript without type checking.

Affected files:
- IScriptUnit: Added run() methods to interface
- JaninoScript: Implemented run() delegation methods
- DataScript, PlayerDataScript, GlobalNPCDataScript, ForgeDataScript
- EffectScript, LinkedItemScript, RecipeScript
- ScriptCustomItem, TileScripted: Refactored to use polymorphic calls
2026-01-14 00:16:58 +02:00
bigguy345 cd60a03544 Moved all INpcScriptHandler implementations to IScriptHandler as its redundant 2026-01-13 23:45:14 +02:00
bigguy345 10b6ccf427 Converted to using IScriptUnit 2026-01-13 22:35:54 +02:00
bigguy345 73db727c47 Deleagted all ScriptContainer NBT based creation to IScriptUnit.createFromNBT 2026-01-13 22:16:51 +02:00
bigguy345 fbcda09fe2 Used IScriptUnit hook stub generation 2026-01-13 21:39:39 +02:00
bigguy345 92cd894f39 Improved JaninoScript hook generation 2026-01-13 21:39:04 +02:00
bigguy345 275cca70c2 Redundant mouseClicked in GuiScript 2026-01-13 20:59:54 +02:00
bigguy345 ba6c3e607c more bruh 2 2026-01-13 20:30:01 +02:00
bigguy345 7b811bdea1 more bruh 2026-01-13 19:16:58 +02:00
bigguy345 8c8f37e75d more merge conflict resolution 2026-01-13 19:13:31 +02:00