Update CraftBukkit to Minecraft 1.7.5

This commit is contained in:
Nate Mortensen
2014-03-20 22:26:30 -06:00
committed by EvilSeph
parent afb3511a4a
commit 385ace970e
206 changed files with 2670 additions and 2679 deletions

View File

@@ -33,7 +33,7 @@ public class PlayerSelector {
}
public static EntityPlayer[] getPlayers(ICommandListener icommandlistener, String s) {
// CraftBukkit start
// CraftBukkit start - disable playerselections for ICommandListeners other than command blocks
if (!(icommandlistener instanceof CommandBlockListenerAbstract)) {
return null;
}
@@ -41,9 +41,7 @@ public class PlayerSelector {
Matcher matcher = a.matcher(s);
if (!matcher.matches()) {
return null;
} else {
if (matcher.matches()) {
Map map = h(matcher.group(2));
String s1 = matcher.group(1);
int i = c(s1);
@@ -111,18 +109,20 @@ public class PlayerSelector {
List list;
if (!s1.equals("p") && !s1.equals("a")) {
if (!s1.equals("r")) {
return null;
} else {
if (s1.equals("r")) {
list = MinecraftServer.getServer().getPlayerList().a(chunkcoordinates, i, j, 0, j1, k, l, map1, s2, s3, world);
Collections.shuffle(list);
list = list.subList(0, Math.min(i1, list.size()));
return list != null && !list.isEmpty() ? (EntityPlayer[]) list.toArray(new EntityPlayer[0]) : new EntityPlayer[0];
return list.isEmpty() ? new EntityPlayer[0] : (EntityPlayer[]) list.toArray(new EntityPlayer[list.size()]);
} else {
return null;
}
} else {
list = MinecraftServer.getServer().getPlayerList().a(chunkcoordinates, i, j, i1, j1, k, l, map1, s2, s3, world);
return list != null && !list.isEmpty() ? (EntityPlayer[]) list.toArray(new EntityPlayer[0]) : new EntityPlayer[0];
return list.isEmpty() ? new EntityPlayer[0] : (EntityPlayer[]) list.toArray(new EntityPlayer[list.size()]);
}
} else {
return null;
}
}