mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 01:46:44 +01:00
Fix Lua require, Fix monster abilities & Fix ServerLuaCall
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package emu.grasscutter.scripts;
|
||||
|
||||
import static emu.grasscutter.utils.FileUtils.getScriptPath;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.scripts.data.controller.EntityController;
|
||||
import lombok.val;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import lombok.val;
|
||||
|
||||
import static emu.grasscutter.utils.FileUtils.getScriptPath;
|
||||
|
||||
public class EntityControllerScriptManager {
|
||||
private static final Map<String, EntityController> gadgetController = new ConcurrentHashMap<>();
|
||||
@@ -30,7 +31,7 @@ public class EntityControllerScriptManager {
|
||||
if (cs == null) return;
|
||||
|
||||
try {
|
||||
cs.eval(bindings);
|
||||
ScriptLoader.eval(cs, bindings);
|
||||
gadgetController.put(controllerName, new EntityController(cs, bindings));
|
||||
} catch (Throwable e) {
|
||||
Grasscutter.getLogger().error("Error while loading gadget controller: {}.", fileName);
|
||||
|
||||
Reference in New Issue
Block a user