summaryrefslogtreecommitdiffstats
path: root/nms-patches/PlayerSelector.patch
blob: 308a19237c0f56e03149e7222fd72d428510cb73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerSelector.java	2014-11-28 11:22:56.158823158 +0000
+++ src/main/java/net/minecraft/server/PlayerSelector.java	2014-11-28 11:01:54.000000000 +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, "@")) {