From abb6588c24fc5635920055f1bb80977cbd4e39c2 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 13 Dec 2016 15:01:05 +1100 Subject: [PATCH] use unmasked player location for scripting --- .../java/com/sk89q/worldedit/command/ScriptingCommands.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java b/core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java index cad8e25c..d490ba3b 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java @@ -19,6 +19,7 @@ package com.sk89q.worldedit.command; +import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandContext; import com.sk89q.minecraft.util.commands.CommandPermissions; @@ -68,7 +69,7 @@ public class ScriptingCommands { final File dir = this.worldEdit.getWorkingDirectoryFile(this.worldEdit.getConfiguration().scriptsDir); final File f = this.worldEdit.getSafeOpenFile(player, dir, name, "js", "js"); try { - ScriptingCommands.this.worldEdit.runScript(player, f, scriptArgs); + ScriptingCommands.this.worldEdit.runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs); } catch (final WorldEditException ex) { player.printError("Error while executing CraftScript."); } @@ -96,7 +97,7 @@ public class ScriptingCommands { final File f = this.worldEdit.getSafeOpenFile(player, dir, lastScript, "js", "js"); try { - ScriptingCommands.this.worldEdit.runScript(player, f, scriptArgs); + ScriptingCommands.this.worldEdit.runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs); } catch (final WorldEditException ex) { player.printError("Error while executing CraftScript."); }