3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Make sure console is included in the ProxyServer audience

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-28 22:57:28 -04:00
Ursprung c4f143a2bc
Commit 0c6039a773

Datei anzeigen

@ -3,6 +3,7 @@ package com.velocitypowered.proxy;
import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterators;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.velocitypowered.api.event.EventManager; import com.velocitypowered.api.event.EventManager;
@ -53,8 +54,10 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.security.KeyPair; import java.security.KeyPair;
import java.util.AbstractCollection;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Iterator;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ -607,7 +610,8 @@ public class VelocityServer implements ProxyServer {
@Override @Override
public @NonNull Iterable<? extends Audience> audiences() { public @NonNull Iterable<? extends Audience> audiences() {
return this.getAllPlayers(); return (Iterable<Audience>) () -> Iterators.concat(Iterators.singletonIterator(console),
getAllPlayers().iterator());
} }
public static Gson getGsonInstance(ProtocolVersion version) { public static Gson getGsonInstance(ProtocolVersion version) {