Made player script implementation closer to that of 1.12.

This commit is contained in:
luisc committed 2021-12-16 02:53:17 -06:00
1 parent 69b7a9aab4
commit 3a9789b3fd
12 files changed
+89 -119

No files matched your search

@@ -20,6 +20,7 @@ import noppes.npcs.CustomNpcs;
import noppes.npcs.NBTTags;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.scripted.NpcAPI;
import scala.Char;
public class ScriptContainer {
@@ -142,6 +143,8 @@ public class ScriptContainer {
this.engine.getContext().setWriter(pw);
this.engine.getContext().setErrorWriter(pw);
this.engine.put("API", NpcAPI.Instance());
try {
if (!this.init) {
this.engine.eval(this.getFullCode());