mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Allowed server names with cool characters
This commit is contained in:
parent
f9fb4b6c98
commit
3fb8323103
@ -125,7 +125,7 @@ public class ServerServerInfo extends ServerInfo {
|
|||||||
server = foundServer.get();
|
server = foundServer.get();
|
||||||
|
|
||||||
// Update information
|
// Update information
|
||||||
String name = config.get(PluginSettings.SERVER_NAME).replaceAll("[^a-zA-Z0-9_\\s]", "_");
|
String name = config.get(PluginSettings.SERVER_NAME);
|
||||||
server.setName("plan".equalsIgnoreCase(name) ? "Server " + server.getId() : name);
|
server.setName("plan".equalsIgnoreCase(name) ? "Server " + server.getId() : name);
|
||||||
|
|
||||||
String webAddress = webServer.get().getAccessAddress();
|
String webAddress = webServer.get().getAccessAddress();
|
||||||
@ -162,7 +162,7 @@ public class ServerServerInfo extends ServerInfo {
|
|||||||
|
|
||||||
private Server createServerObject(UUID serverUUID) {
|
private Server createServerObject(UUID serverUUID) {
|
||||||
String webAddress = webServer.get().getAccessAddress();
|
String webAddress = webServer.get().getAccessAddress();
|
||||||
String name = config.get(PluginSettings.SERVER_NAME).replaceAll("[^a-zA-Z0-9_\\s]", "_");
|
String name = config.get(PluginSettings.SERVER_NAME);
|
||||||
int maxPlayers = serverProperties.getMaxPlayers();
|
int maxPlayers = serverProperties.getMaxPlayers();
|
||||||
return new Server(-1, serverUUID, name, webAddress, maxPlayers);
|
return new Server(-1, serverUUID, name, webAddress, maxPlayers);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user