Fix set compatibility with SKCompat
This commit is contained in:
parent
ee0a09e132
commit
9a430f3232
@ -134,7 +134,7 @@ public abstract class FawePlayer<T> extends Metadatable {
|
||||
}
|
||||
|
||||
public void checkConfirmationRadius(String command, int radius) throws RegionOperationException {
|
||||
if (getMeta("cmdConfirmRunning", false)) {
|
||||
if (command == null || getMeta("cmdConfirmRunning", false)) {
|
||||
return;
|
||||
}
|
||||
if (radius > 0) {
|
||||
@ -146,7 +146,7 @@ public abstract class FawePlayer<T> extends Metadatable {
|
||||
}
|
||||
|
||||
public void checkConfirmationStack(String command, Region region, int times) throws RegionOperationException {
|
||||
if (getMeta("cmdConfirmRunning", false)) {
|
||||
if (command == null || getMeta("cmdConfirmRunning", false)) {
|
||||
return;
|
||||
}
|
||||
if (region != null) {
|
||||
@ -161,7 +161,7 @@ public abstract class FawePlayer<T> extends Metadatable {
|
||||
}
|
||||
|
||||
public void checkConfirmationRegion(String command, Region region) throws RegionOperationException {
|
||||
if (getMeta("cmdConfirmRunning", false)) {
|
||||
if (command == null || getMeta("cmdConfirmRunning", false)) {
|
||||
return;
|
||||
}
|
||||
if (region != null) {
|
||||
|
@ -72,6 +72,7 @@ public class MethodCommands {
|
||||
}
|
||||
|
||||
public String getArguments(CommandContext context) {
|
||||
if (context == null) return null;
|
||||
CommandLocals locals = context.getLocals();
|
||||
if (locals != null) {
|
||||
return (String) locals.get("arguments");
|
||||
|
@ -322,6 +322,12 @@ public class RegionCommands extends MethodCommands {
|
||||
BBC.TIP_REPLACE_ID.or(BBC.TIP_REPLACE_LIGHT, BBC.TIP_REPLACE_MARKER, BBC.TIP_TAB_COMPLETE).send(player);
|
||||
}
|
||||
|
||||
// Compatibility for SKCompat
|
||||
@Deprecated
|
||||
public void set(Player player, LocalSession session, EditSession editSession, Pattern pattern) throws WorldEditException {
|
||||
set(FawePlayer.wrap(player), session, editSession, session.getSelection(player.getWorld()), pattern, null);
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/set", "/s"},
|
||||
usage = "[pattern]",
|
||||
|
@ -69,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(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs);
|
||||
this.worldEdit.runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs);
|
||||
} catch (final WorldEditException ex) {
|
||||
player.printError("Error while executing CraftScript.");
|
||||
}
|
||||
@ -97,7 +97,7 @@ public class ScriptingCommands {
|
||||
final File f = this.worldEdit.getSafeOpenFile(player, dir, lastScript, "js", "js");
|
||||
|
||||
try {
|
||||
ScriptingCommands.this.worldEdit.runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs);
|
||||
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