mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 18:07:39 +01:00
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.
This commit is contained in:
parent
b602b5efa4
commit
a8628fd645
@ -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<EntityPlayer, CraftPlayer>() {
|
||||
this.playerView = Collections.unmodifiableList(net.minecraft.util.com.google.common.collect.Lists.transform(playerList.players, new net.minecraft.util.com.google.common.base.Function<EntityPlayer, CraftPlayer>() {
|
||||
@Override
|
||||
public CraftPlayer apply(EntityPlayer player) {
|
||||
return player.getBukkitEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user