mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
use unmasked player location for scripting
This commit is contained in:
parent
23cb3642f1
commit
abb6588c24
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user