mirror of
https://codeberg.org/Andre601/AdvancedServerList.git
synced 2026-11-05 17:02:34 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
356bc09c09 |
No files matched your search
+10
-2
@@ -30,6 +30,7 @@ import ch.andre601.advancedserverlist.core.AdvancedServerList;
|
||||
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ProfileManager;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.Placeholders;
|
||||
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
|
||||
import net.md_5.bungee.api.ServerPing;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
@@ -58,8 +59,14 @@ public class PingEvent implements Listener{
|
||||
return;
|
||||
|
||||
InetSocketAddress address = (InetSocketAddress)event.getConnection().getSocketAddress();
|
||||
Map<String, Object> replacements = plugin.getCore()
|
||||
.loadPlaceholders(protocol.getProtocol(), ping.getPlayers().getOnline(), ping.getPlayers().getMax(), address);
|
||||
InetSocketAddress host = event.getConnection().getVirtualHost();
|
||||
Map<String, Object> replacements = Placeholders.get(plugin.getCore())
|
||||
.withProtocol(protocol.getProtocol())
|
||||
.withPlayersOnline(ping.getPlayers().getOnline())
|
||||
.withPlayersMax(ping.getPlayers().getMax())
|
||||
.withPlayerName(address)
|
||||
.withHostAddress(host)
|
||||
.getReplacements();
|
||||
|
||||
ServerListProfile profile = ProfileManager.get(plugin.getCore())
|
||||
.replacements(replacements)
|
||||
@@ -93,6 +100,7 @@ public class PingEvent implements Listener{
|
||||
|
||||
ServerPing.PlayerInfo[] playerInfos = AdvancedServerList.getPlayers(ServerPing.PlayerInfo.class, players)
|
||||
.toArray(new ServerPing.PlayerInfo[0]);
|
||||
|
||||
if(playerInfos.length > 0)
|
||||
ping.getPlayers().setSample(playerInfos);
|
||||
|
||||
|
||||
@@ -29,15 +29,12 @@ import ch.andre601.advancedserverlist.core.commands.CommandHandler;
|
||||
import ch.andre601.advancedserverlist.core.file.FileHandler;
|
||||
import ch.andre601.advancedserverlist.core.interfaces.PluginCore;
|
||||
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
|
||||
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
|
||||
import ch.andre601.advancedserverlist.core.profiles.players.PlayerHandler;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.Placeholders;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
@@ -69,9 +66,7 @@ public class AdvancedServerList{
|
||||
constructor.setAccessible(true);
|
||||
|
||||
for(String line : lines){
|
||||
players.add(constructor.newInstance(
|
||||
ComponentParser.text(line).toString(), UUID.randomUUID()
|
||||
));
|
||||
players.add(constructor.newInstance(line, UUID.randomUUID()));
|
||||
}
|
||||
|
||||
return players;
|
||||
@@ -80,17 +75,6 @@ public class AdvancedServerList{
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Object> loadPlaceholders(int protocol, int online, int max, InetSocketAddress ip){
|
||||
Map<String, Object> replacements = new HashMap<>();
|
||||
|
||||
replacements.put(Placeholders.PLAYER_PROTOCOL, protocol);
|
||||
replacements.put(Placeholders.PLAYERS_ONLINE, online);
|
||||
replacements.put(Placeholders.PLAYERS_MAX, max);
|
||||
replacements.put(Placeholders.PLAYER_NAME, getPlayerHandler().getPlayerByIp(ip.getHostString()));
|
||||
|
||||
return replacements;
|
||||
}
|
||||
|
||||
public void disable(){
|
||||
getPluginLogger().info("Saving cache.data file...");
|
||||
getPlayerHandler().save();
|
||||
|
||||
@@ -38,12 +38,10 @@ public class ComponentParser{
|
||||
|
||||
private static final MiniMessage mm;
|
||||
private static final LegacyComponentSerializer legacy;
|
||||
private static final StringReplacer replacer;
|
||||
|
||||
static {
|
||||
mm = MiniMessage.miniMessage();
|
||||
legacy = LegacyComponentSerializer.legacySection();
|
||||
replacer = new StringReplacer();
|
||||
}
|
||||
|
||||
private String text;
|
||||
@@ -61,17 +59,17 @@ public class ComponentParser{
|
||||
}
|
||||
|
||||
public ComponentParser replacements(Map<String, Object> replacements){
|
||||
replacements.forEach(replacer::add);
|
||||
text = StringReplacer.replace(text, replacements);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ComponentParser function(Function<String, String> function){
|
||||
public ComponentParser modifyText(Function<String, String> function){
|
||||
this.text = function.apply(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Component toComponent(){
|
||||
return mm.deserialize(replacer.replace(text));
|
||||
return mm.deserialize(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-7
@@ -28,22 +28,20 @@ package ch.andre601.advancedserverlist.core.profiles;
|
||||
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.*;
|
||||
|
||||
public class ConditionsHolder{
|
||||
|
||||
private final List<String> expressions = new ArrayList<>();
|
||||
private final StringReplacer replacer = new StringReplacer();
|
||||
private final Map<String, Object> replacements = new HashMap<>();
|
||||
|
||||
public ConditionsHolder(List<String> expressions){
|
||||
if(expressions != null && !expressions.isEmpty())
|
||||
this.expressions.addAll(expressions);
|
||||
}
|
||||
|
||||
public void replace(String from, Object to){
|
||||
replacer.add(from, to);
|
||||
public void replacements(Map<String, Object> replacements){
|
||||
this.replacements.putAll(replacements);
|
||||
}
|
||||
|
||||
public boolean eval(PluginLogger logger){
|
||||
@@ -62,7 +60,7 @@ public class ConditionsHolder{
|
||||
if(expression == null || expression.isEmpty())
|
||||
return true;
|
||||
|
||||
String newExpression = replacer.replace(expression);
|
||||
String newExpression = StringReplacer.replace(expression, replacements);
|
||||
|
||||
char[] chars = newExpression.toCharArray();
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
package ch.andre601.advancedserverlist.core.profiles;
|
||||
|
||||
import ch.andre601.advancedserverlist.core.AdvancedServerList;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -56,7 +55,7 @@ public class ProfileManager{
|
||||
continue;
|
||||
|
||||
ConditionsHolder conditions = profile.getConditions();
|
||||
replacements.forEach(conditions::replace);
|
||||
conditions.replacements(replacements);
|
||||
if(conditions.eval(core.getPluginLogger()))
|
||||
return profile;
|
||||
}
|
||||
|
||||
+62
-5
@@ -25,12 +25,69 @@
|
||||
|
||||
package ch.andre601.advancedserverlist.core.profiles.replacer;
|
||||
|
||||
import ch.andre601.advancedserverlist.core.AdvancedServerList;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Placeholders{
|
||||
|
||||
public static final String PLAYERS_ONLINE = "${players online}";
|
||||
public static final String PLAYERS_MAX = "${players max}";
|
||||
private final AdvancedServerList core;
|
||||
private final Map<String, Object> replacements;
|
||||
|
||||
public static final String PLAYER_NAME = "${player name}";
|
||||
public static final String PLAYER_PROTOCOL = "${player protocol}";
|
||||
public static final String PLAYER_VERSION = "${player version}";
|
||||
public Placeholders(AdvancedServerList core){
|
||||
this.core = core;
|
||||
this.replacements = new HashMap<>();
|
||||
}
|
||||
|
||||
public static Placeholders get(AdvancedServerList core){
|
||||
return new Placeholders(core);
|
||||
}
|
||||
|
||||
|
||||
public Placeholders withProtocol(int protocol){
|
||||
this.replacements.put("${player protocol}", protocol);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withPlayersOnline(int online){
|
||||
this.replacements.put("${players online}", online);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withPlayersMax(int max){
|
||||
this.replacements.put("${players max}", max);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withPlayerName(InetSocketAddress playerAddress){
|
||||
if(playerAddress != null)
|
||||
this.replacements.put("${player name}", core.getPlayerHandler().getPlayerByIp(playerAddress.getHostString()));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withHostAddress(InetSocketAddress hostAddress){
|
||||
if(hostAddress != null)
|
||||
this.replacements.put("${server host}", hostAddress.getHostString());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withHostAddress(String hostAddress){
|
||||
if(hostAddress != null)
|
||||
this.replacements.put("${server host}", hostAddress);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Placeholders withPlayerVersion(String version){
|
||||
this.replacements.put("${player version}", version);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, Object> getReplacements(){
|
||||
return replacements;
|
||||
}
|
||||
}
|
||||
+2
-30
@@ -25,42 +25,14 @@
|
||||
|
||||
package ch.andre601.advancedserverlist.core.profiles.replacer;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* Original by Imo van den Berge (aka Bergerkiller: https://github.com/Bergerkiller)
|
||||
*
|
||||
* Original Source: https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/StringReplaceBundle.java
|
||||
*/
|
||||
public class StringReplacer{
|
||||
|
||||
private final EntryList<String, Object> entries = new EntryList<>();
|
||||
|
||||
public void add(String from, Object to){
|
||||
if(from == null || to == null)
|
||||
return;
|
||||
|
||||
entries.add(from, to);
|
||||
}
|
||||
|
||||
public Object get(String from){
|
||||
Iterator<Map.Entry<String, Object>> iterator = entries.iterator();
|
||||
Map.Entry<String, Object> entry;
|
||||
while(iterator.hasNext()){
|
||||
entry = iterator.next();
|
||||
if(entry.getKey().equals(from)){
|
||||
iterator.remove();
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(String input){
|
||||
public static String replace(String input, Map<String, Object> replacements){
|
||||
StringBuilder output = new StringBuilder(input);
|
||||
int index;
|
||||
for(Map.Entry<String, Object> entry : entries){
|
||||
for(Map.Entry<String, Object> entry : replacements.entrySet()){
|
||||
index = 0;
|
||||
while((index = output.indexOf(entry.getKey(), index)) != -1){
|
||||
output.replace(index, index + entry.getKey().length(), String.valueOf(entry.getValue()));
|
||||
|
||||
@@ -17,29 +17,35 @@ priority: 0
|
||||
|
||||
#
|
||||
# Set the MOTD that should be displayed.
|
||||
# Can be removed or set to "motd: []" to not alter the MOTD.
|
||||
# Supports HEX colors for 1.16+ servers including gradients using MiniMessage's <gradient:color:color> format.
|
||||
#
|
||||
# Remove this option or set it to motd: [] to not alter the MOTD.
|
||||
#
|
||||
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#motd
|
||||
#
|
||||
motd:
|
||||
- 'Line 1'
|
||||
- 'Line 2'
|
||||
- '<grey>Line 1'
|
||||
- '<grey>Line 2'
|
||||
|
||||
#
|
||||
# Set the hover text that usually displays online players.
|
||||
# Can be removed or set to "players: []" to not alter the player list.
|
||||
# Only normal colours such as <grey> or <aqua> are supported.
|
||||
#
|
||||
# Remove this option or set it to players: [] to not alter the hover text.
|
||||
#
|
||||
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#players
|
||||
#
|
||||
players:
|
||||
- 'Line 1'
|
||||
- 'Line 2'
|
||||
- 'Line 3'
|
||||
- '<grey>Line 1'
|
||||
- '<grey>Line 2'
|
||||
- '<grey>Line 3'
|
||||
|
||||
#
|
||||
# Set the text that usually shows online players and max that can join.
|
||||
# Can be removed or set to "playerCount: ''" to not alter the player count text.
|
||||
# Only normal colours such as <grey> or <aqua> are supported.
|
||||
#
|
||||
# Remove this option or set it to playerCount: '' to not alter the player count text.
|
||||
#
|
||||
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#playercount
|
||||
#
|
||||
playerCount: 'Text'
|
||||
playerCount: '<grey>Text'
|
||||
@@ -28,6 +28,7 @@ package ch.andre601.advancedserverlist.paper.events;
|
||||
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ProfileManager;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.Placeholders;
|
||||
import ch.andre601.advancedserverlist.paper.PaperCore;
|
||||
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
||||
import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
@@ -55,8 +56,14 @@ public class PingEvent implements Listener{
|
||||
@EventHandler
|
||||
public void onServerPing(PaperServerListPingEvent event){
|
||||
InetSocketAddress address = event.getClient().getAddress();
|
||||
Map<String, Object> replacements = plugin.getCore()
|
||||
.loadPlaceholders(event.getClient().getProtocolVersion(), event.getNumPlayers(), event.getMaxPlayers(), address);
|
||||
InetSocketAddress host = event.getClient().getVirtualHost();
|
||||
Map<String, Object> replacements = Placeholders.get(plugin.getCore())
|
||||
.withProtocol(event.getClient().getProtocolVersion())
|
||||
.withPlayersOnline(event.getNumPlayers())
|
||||
.withPlayersMax(event.getMaxPlayers())
|
||||
.withPlayerName(address)
|
||||
.withHostAddress(host)
|
||||
.getReplacements();
|
||||
|
||||
ServerListProfile profile = ProfileManager.get(plugin.getCore())
|
||||
.replacements(replacements)
|
||||
@@ -70,7 +77,7 @@ public class PingEvent implements Listener{
|
||||
if(!profile.getMotd().isEmpty()){
|
||||
event.motd(ComponentParser.list(profile.getMotd())
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
@@ -82,7 +89,7 @@ public class PingEvent implements Listener{
|
||||
if(!profile.getPlayerCount().isEmpty()){
|
||||
event.setVersion(ComponentParser.text(profile.getPlayerCount())
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
@@ -104,7 +111,7 @@ public class PingEvent implements Listener{
|
||||
List<PlayerProfile> players = new ArrayList<>();
|
||||
lines.forEach(line -> players.add(Bukkit.createProfile(UUID.randomUUID(), ComponentParser.text(line)
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<plugin.version>1.0.3</plugin.version>
|
||||
<plugin.version>1.1.0</plugin.version>
|
||||
<plugin.description>Create multiple Server lists based on conditions.</plugin.description>
|
||||
|
||||
<plugin.depend.mc>1.19-R0.1-SNAPSHOT</plugin.depend.mc>
|
||||
|
||||
@@ -28,6 +28,7 @@ package ch.andre601.advancedserverlist.spigot.events;
|
||||
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ProfileManager;
|
||||
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
|
||||
import ch.andre601.advancedserverlist.core.profiles.replacer.Placeholders;
|
||||
import ch.andre601.advancedserverlist.spigot.SpigotCore;
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.ProtocolManager;
|
||||
@@ -51,6 +52,8 @@ public class PingEvent implements Listener{
|
||||
private final SpigotCore plugin;
|
||||
private final ProtocolManager protocolManager;
|
||||
|
||||
private final Map<String, String> hostAddresses = new HashMap<>();
|
||||
|
||||
public PingEvent(SpigotCore plugin, ProtocolManager protocolManager){
|
||||
this.plugin = plugin;
|
||||
this.protocolManager = protocolManager;
|
||||
@@ -59,6 +62,18 @@ public class PingEvent implements Listener{
|
||||
}
|
||||
|
||||
private void loadPacketListener(SpigotCore spigotPlugin){
|
||||
protocolManager.addPacketListener(new PacketAdapter(spigotPlugin, ListenerPriority.LOW, PacketType.Handshake.Client.SET_PROTOCOL){
|
||||
@Override
|
||||
public void onPacketReceiving(PacketEvent event){
|
||||
InetSocketAddress address = event.getPlayer().getAddress();
|
||||
if(address == null)
|
||||
return;
|
||||
|
||||
String host = event.getPacket().getStrings().read(0);
|
||||
|
||||
hostAddresses.put(address.getHostString(), host);
|
||||
}
|
||||
});
|
||||
protocolManager.addPacketListener(new PacketAdapter(spigotPlugin, ListenerPriority.LOW, PacketType.Status.Server.SERVER_INFO){
|
||||
@Override
|
||||
public void onPacketSending(PacketEvent event){
|
||||
@@ -67,8 +82,15 @@ public class PingEvent implements Listener{
|
||||
if(address == null)
|
||||
return;
|
||||
|
||||
Map<String, Object> replacements = spigotPlugin.getCore()
|
||||
.loadPlaceholders(ping.getVersionProtocol(), ping.getPlayersOnline(), ping.getPlayersMaximum(), address);
|
||||
Map<String, Object> replacements = Placeholders.get(spigotPlugin.getCore())
|
||||
.withProtocol(ping.getVersionProtocol())
|
||||
.withPlayersOnline(ping.getPlayersOnline())
|
||||
.withPlayersMax(ping.getPlayersMaximum())
|
||||
.withPlayerName(address)
|
||||
.withHostAddress(hostAddresses.get(address.getHostString()))
|
||||
.getReplacements();
|
||||
|
||||
spigotPlugin.getPluginLogger().info(hostAddresses.get(address.getHostString()));
|
||||
|
||||
ServerListProfile profile = ProfileManager.get(spigotPlugin.getCore())
|
||||
.replacements(replacements)
|
||||
@@ -82,7 +104,7 @@ public class PingEvent implements Listener{
|
||||
if(!profile.getMotd().isEmpty()){
|
||||
Component component = ComponentParser.list(profile.getMotd())
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
@@ -95,7 +117,7 @@ public class PingEvent implements Listener{
|
||||
if(!profile.getPlayerCount().isEmpty()){
|
||||
ping.setVersionName(ComponentParser.text(profile.getPlayerCount())
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
@@ -110,7 +132,7 @@ public class PingEvent implements Listener{
|
||||
ping.setPlayers(getFakePlayers(
|
||||
ComponentParser.list(profile.getPlayers())
|
||||
.replacements(replacements)
|
||||
.function(text -> {
|
||||
.modifyText(text -> {
|
||||
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||
return PlaceholderAPI.setPlaceholders(player, text);
|
||||
|
||||
|
||||
+10
-3
@@ -59,10 +59,16 @@ public class PingEvent{
|
||||
|
||||
ServerPing.Builder builder = ping.asBuilder();
|
||||
InetSocketAddress address = event.getConnection().getRemoteAddress();
|
||||
InetSocketAddress host = event.getConnection().getVirtualHost().orElse(null);
|
||||
|
||||
Map<String, Object> replacements = plugin.getCore()
|
||||
.loadPlaceholders(protocol.getProtocol(), builder.getOnlinePlayers(), builder.getMaximumPlayers(), address);
|
||||
replacements.put(Placeholders.PLAYER_VERSION, ProtocolVersion.getProtocolVersion(protocol.getProtocol()));
|
||||
Map<String, Object> replacements = Placeholders.get(plugin.getCore())
|
||||
.withProtocol(protocol.getProtocol())
|
||||
.withPlayersOnline(builder.getOnlinePlayers())
|
||||
.withPlayersMax(builder.getMaximumPlayers())
|
||||
.withPlayerName(address)
|
||||
.withHostAddress(host)
|
||||
.withPlayerVersion(ProtocolVersion.getProtocolVersion(protocol.getProtocol()).toString())
|
||||
.getReplacements();
|
||||
|
||||
ServerListProfile profile = ProfileManager.get(plugin.getCore())
|
||||
.replacements(replacements)
|
||||
@@ -92,6 +98,7 @@ public class PingEvent{
|
||||
String players = ComponentParser.list(profile.getPlayers())
|
||||
.replacements(replacements)
|
||||
.toString();
|
||||
|
||||
ServerPing.SamplePlayer[] playerSamples = AdvancedServerList.getPlayers(ServerPing.SamplePlayer.class, players)
|
||||
.toArray(new ServerPing.SamplePlayer[0]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user