Commit Graph

11 Commits

Author SHA1 Message Date
P0nk
d691dc1e18 Prefer Path.of() over Paths.get() 2022-08-11 19:01:40 +02:00
Đạt Nhân Trương
bbdf236a10 Clean code 2022-08-06 18:16:52 +07:00
Đạt Nhân Trương
61c3e75a52 Fully mirgate main source to Java NIO (except some files in tools). 2022-08-06 18:13:47 +07:00
P0nk
8b630f7357 Migrate yet another batch of FilePrinter users to Slf4j
One FilePrinter.printError() method removed, one more to go
2022-02-09 21:05:22 +01:00
P0nk
d389665bd7 Reformat and clean up "scripting" package 2021-09-09 23:26:45 +02:00
P0nk
b07e6799dc Rename and clean up MapleClient 2021-09-09 21:13:48 +02:00
P0nk
c841e9952b Respect charset when loading scripts 2021-09-08 18:46:16 +02:00
P0nk
46c2d92082 refactor: use Invocable instead of ScriptEngine in script managers
- Make fields final
- Inject event script variable earlier
- Remove redundant fields
2021-04-18 11:26:05 +02:00
P0nk
58e69654a2 Let scripts access Java classes
Fix script attempting to schedule with non-long (double) time value
2021-04-17 22:26:18 +02:00
P0nk
a18a1cb8ce Replace NashornScriptEngine with implicit GraalJSScriptEngine
GraalJSScriptEngine implements Invocable, which is why casting to it works.
However, this is just a quick and ugly fix to make it compile.
A better solution would be to cast it once, immediately after `eval`,
and from then on only handle it as Invocable.

Scripts still need to be fixed. They are still using Rhino and Nashorn-specific
ways of importing packages.
Usages of "importPackage" and "Packages" need to be replaced with
the Graal specific "Java.type".
2021-04-17 15:12:19 +02:00
P0nk
813643036b Switch to Maven file structure 2021-03-30 21:56:34 +02:00