1
0

Adding custom tablist name capabilities

Dieser Commit ist enthalten in:
Lixfel 2020-10-29 08:52:46 +01:00
Ursprung 1c8ab9383c
Commit 282a55d2f6

Datei anzeigen

@ -31,8 +31,10 @@ import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -68,6 +70,7 @@ public class Subserver implements Runnable {
private boolean started; private boolean started;
private final List<ProxiedPlayer> cachedPlayers = new LinkedList<>(); private final List<ProxiedPlayer> cachedPlayers = new LinkedList<>();
private final Map<ProxiedPlayer, String> tablistNames = new HashMap<>();
public Subserver(Servertype type, String serverName, int port, String... command){ public Subserver(Servertype type, String serverName, int port, String... command){
this(type, serverName, port, () -> {}, command); this(type, serverName, port, () -> {}, command);
@ -103,6 +106,9 @@ public class Subserver implements Runnable {
public Servertype getType(){ public Servertype getType(){
return type; return type;
} }
public Map<ProxiedPlayer, String> getTablistNames(){
return tablistNames;
}
public void sendPlayer(ProxiedPlayer p){ public void sendPlayer(ProxiedPlayer p){
if(!started){ if(!started){