mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 17:27:38 +00:00
Now you can use /script.js directly as a command.
This commit is contained in:
parent
4c2faf175b
commit
14bcf2fa06
@ -2119,10 +2119,16 @@ public class WorldEdit {
|
||||
// Legacy /, command
|
||||
if (split[0].equals("/,")) {
|
||||
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)
|
||||
|| (config.noDoubleSlash && commands.containsKey("/" + searchCmd))
|
||||
|| ((searchCmd.length() < 3 || searchCmd.charAt(2) != '/')
|
||||
|
Loading…
Reference in New Issue
Block a user