mirror of
https://github.com/kaboomserver/extras.git
synced 2025-02-11 03:29:50 +00:00
Remove redundant distance selector check
Patched in Scissors, 345a876a96
This commit is contained in:
parent
1cd903e3d4
commit
70c91538c0
1 changed files with 0 additions and 7 deletions
|
@ -19,8 +19,6 @@ import java.util.regex.Pattern;
|
||||||
public final class ServerCommand implements Listener {
|
public final class ServerCommand implements Listener {
|
||||||
private static final Pattern AS_AT_PATTERN = Pattern.compile(
|
private static final Pattern AS_AT_PATTERN = Pattern.compile(
|
||||||
"\\b(as|at|facing entity) @[ae]\\b");
|
"\\b(as|at|facing entity) @[ae]\\b");
|
||||||
private static final Pattern DISTANCE_SELECTOR_PATTERN = Pattern.compile(
|
|
||||||
"@[aeprs]\\[[\"']?distance[\"']?\\s*=\\s*");
|
|
||||||
private static final Logger LOGGER = JavaPlugin.getPlugin(Main.class).getLogger();
|
private static final Logger LOGGER = JavaPlugin.getPlugin(Main.class).getLogger();
|
||||||
|
|
||||||
public static boolean checkExecuteCommand(final String cmd) {
|
public static boolean checkExecuteCommand(final String cmd) {
|
||||||
|
@ -215,11 +213,6 @@ public final class ServerCommand implements Listener {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command.contains("distance")) {
|
|
||||||
final Matcher distanceMatcher = DISTANCE_SELECTOR_PATTERN.matcher(command);
|
|
||||||
return distanceMatcher.replaceAll("]");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue