Adding custom tablist name capabilities
Dieser Commit ist enthalten in:
Ursprung
1c8ab9383c
Commit
282a55d2f6
@ -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){
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren