From a8628fd645e12ec22bc525f49dd25f68d094f3ef Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Tue, 1 Jul 2014 00:47:39 -0500 Subject: [PATCH] Use 4787c23dce0f5ac856d8d398225828971a93a3ff Guava patch for onlinePlayers This change improves the quality of life for plugin developers using iterator iteration with side-effects. In the specified Guava patch, the internal iterator no longer relies on the AbstractList iterator which iterates by index, and will instead wrap the provided iterator in a transformer given the Function. --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 3c92c3ce87..883f8099bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -186,9 +186,7 @@ import com.avaje.ebean.config.DataSourceConfig; import com.avaje.ebean.config.ServerConfig; import com.avaje.ebean.config.dbplatform.SQLitePlatform; import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; -import com.google.common.base.Function; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; import com.google.common.collect.MapMaker; import jline.console.ConsoleReader; @@ -246,7 +244,7 @@ public final class CraftServer implements Server { public CraftServer(MinecraftServer console, PlayerList playerList) { this.console = console; this.playerList = (DedicatedPlayerList) playerList; - this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, new Function() { + this.playerView = Collections.unmodifiableList(net.minecraft.util.com.google.common.collect.Lists.transform(playerList.players, new net.minecraft.util.com.google.common.base.Function() { @Override public CraftPlayer apply(EntityPlayer player) { return player.getBukkitEntity();