Fix selectors in non-bukkit commands for command blocks
Dieser Commit ist enthalten in:
Ursprung
3c4a02ed33
Commit
2422099346
@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 20:19:48.021499587 +0000
|
||||
+++ src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 20:18:58.289500691 +0000
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/CommandBlockListenerAbstract.java 2014-12-02 20:23:51.921621335 +0000
|
||||
+++ src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java 2014-12-02 20:23:10.809622247 +0000
|
||||
@@ -4,6 +4,13 @@
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.Callable;
|
||||
@ -134,7 +134,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||
@@ -91,8 +202,26 @@
|
||||
@@ -91,8 +202,27 @@
|
||||
} else {
|
||||
this.b = 0;
|
||||
}
|
||||
@ -143,7 +143,8 @@
|
||||
+ // CraftBukkit start
|
||||
+ private ArrayList<String[]> buildCommands(String[] args, int pos) {
|
||||
+ ArrayList<String[]> commands = new ArrayList<String[]>();
|
||||
+ EntityPlayer[] players = ((java.util.List<EntityPlayer>)PlayerSelector.getPlayers(this, args[pos], EntityPlayer.class)).toArray(new EntityPlayer[0]);
|
||||
+ java.util.List<EntityPlayer> players = (java.util.List<EntityPlayer>)PlayerSelector.getPlayers(this, args[pos], EntityPlayer.class);
|
||||
+
|
||||
+ if (players != null) {
|
||||
+ for (EntityPlayer player : players) {
|
||||
+ if (player.world != this.getWorld()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerSelector.java 2014-11-28 17:43:43.337707430 +0000
|
||||
+++ src/main/java/net/minecraft/server/PlayerSelector.java 2014-11-28 17:38:17.000000000 +0000
|
||||
--- ../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 @@
|
||||
}
|
||||
|
||||
@ -12,3 +12,12 @@
|
||||
Matcher matcher = PlayerSelector.a.matcher(s);
|
||||
|
||||
if (matcher.matches() && icommandlistener.a(1, "@")) {
|
||||
@@ -97,7 +102,7 @@
|
||||
if (h(map)) {
|
||||
arraylist.add(icommandlistener.getWorld());
|
||||
} else {
|
||||
- Collections.addAll(arraylist, MinecraftServer.getServer().worldServer);
|
||||
+ arraylist.addAll(MinecraftServer.getServer().worlds); // CraftBukkit
|
||||
}
|
||||
|
||||
return arraylist;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren