Re-enable selectors for players and the console using vanilla commands
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerSelector.java 2014-12-02 20:23:52.649621319 +0000
|
||||
+++ src/main/java/net/minecraft/server/PlayerSelector.java 2014-12-02 20:22:46.409622789 +0000
|
||||
@@ -52,6 +52,11 @@
|
||||
}
|
||||
|
||||
public static List getPlayers(ICommandListener icommandlistener, String s, Class oclass) {
|
||||
+ // CraftBukkit start - disable playerselections for ICommandListeners other than command blocks
|
||||
+ if (!(icommandlistener instanceof CommandBlockListenerAbstract)) {
|
||||
+ return com.google.common.collect.ImmutableList.of();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Matcher matcher = PlayerSelector.a.matcher(s);
|
||||
|
||||
if (matcher.matches() && icommandlistener.a(1, "@")) {
|
||||
@@ -97,7 +102,7 @@
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/PlayerSelector.java 2014-12-11 20:04:51.273619960 +0000
|
||||
+++ src/main/java/net/minecraft/server/PlayerSelector.java 2014-12-11 20:03:19.893620952 +0000
|
||||
@@ -97,7 +97,7 @@
|
||||
if (h(map)) {
|
||||
arraylist.add(icommandlistener.getWorld());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user