From ce74dcc483c420f26b8a97803456e5fefbeb7a63 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Wed, 15 Jul 2020 16:33:42 -0400 Subject: [PATCH] Try not to be crafty here --- .../java/com/velocitypowered/proxy/VelocityServer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 7a817089f..07e6dee11 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -3,7 +3,6 @@ package com.velocitypowered.proxy; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterators; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.velocitypowered.api.event.EventManager; @@ -621,8 +620,10 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { @Override public @NonNull Iterable audiences() { - return (Iterable) () -> Iterators.concat(Iterators.singletonIterator(console), - getAllPlayers().iterator()); + Collection audiences = new ArrayList<>(this.getPlayerCount() + 1); + audiences.add(this.console); + audiences.addAll(this.getAllPlayers()); + return audiences; } public BossBarManager getBossBarManager() {