From 955af1569717194ef23871576da207228f4a11ee Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Tue, 5 Jan 2016 02:00:44 +0700 Subject: [PATCH] Make Server.getOnlinePlayers returns immutable collection, like it said in docs. This is also fix crash with /stop and /restart commands while any players had been online. --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0e45b9f..fa5d47e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -452,7 +452,7 @@ public final class CraftServer implements Server { @Override public List getOnlinePlayers() { - return this.playerView; + return ImmutableList.copyOf(this.playerView); } @Override