3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Now you can use /script.js directly as a command.

Dieser Commit ist enthalten in:
sk89q 2011-01-26 12:38:51 -08:00
Ursprung 4c2faf175b
Commit 14bcf2fa06

Datei anzeigen

@ -2119,10 +2119,16 @@ public class WorldEdit {
// Legacy /, command // Legacy /, command
if (split[0].equals("/,")) { if (split[0].equals("/,")) {
split[0] = "//"; split[0] = "//";
// Quick script shortcut
} else if (split[0].matches("^.+\\.js$")) {
String[] newSplit = new String[split.length + 1];
System.arraycopy(split, 0, newSplit, 1, split.length);
newSplit[0] = "/cs";
split = newSplit;
} }
String searchCmd = split[0].toLowerCase();
String searchCmd = split[0].toLowerCase();
if (commands.containsKey(searchCmd) if (commands.containsKey(searchCmd)
|| (config.noDoubleSlash && commands.containsKey("/" + searchCmd)) || (config.noDoubleSlash && commands.containsKey("/" + searchCmd))
|| ((searchCmd.length() < 3 || searchCmd.charAt(2) != '/') || ((searchCmd.length() < 3 || searchCmd.charAt(2) != '/')