mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-09 13:19:07 +01:00
[#1012] Removed ServerProperties#getServerId
This commit is contained in:
parent
23485310d1
commit
bbb1152cd5
@ -27,7 +27,6 @@ public class BukkitServerProperties extends ServerProperties {
|
|||||||
|
|
||||||
public BukkitServerProperties(Server server) {
|
public BukkitServerProperties(Server server) {
|
||||||
super(
|
super(
|
||||||
server.getServerId(),
|
|
||||||
server.getName(),
|
server.getName(),
|
||||||
server.getPort(),
|
server.getPort(),
|
||||||
server.getVersion(),
|
server.getVersion(),
|
||||||
|
@ -31,7 +31,6 @@ public class BungeeServerProperties extends ServerProperties {
|
|||||||
|
|
||||||
public BungeeServerProperties(ProxyServer server, PlanConfig config) {
|
public BungeeServerProperties(ProxyServer server, PlanConfig config) {
|
||||||
super(
|
super(
|
||||||
server.getServers().toString(),
|
|
||||||
"BungeeCord",
|
"BungeeCord",
|
||||||
-1,
|
-1,
|
||||||
server.getVersion(),
|
server.getVersion(),
|
||||||
|
@ -27,7 +27,6 @@ import java.util.function.Supplier;
|
|||||||
*/
|
*/
|
||||||
public abstract class ServerProperties {
|
public abstract class ServerProperties {
|
||||||
|
|
||||||
private final String id;
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final int port;
|
private final int port;
|
||||||
private final String version;
|
private final String version;
|
||||||
@ -38,7 +37,6 @@ public abstract class ServerProperties {
|
|||||||
private final IntSupplier onlinePlayers;
|
private final IntSupplier onlinePlayers;
|
||||||
|
|
||||||
protected ServerProperties(
|
protected ServerProperties(
|
||||||
String id,
|
|
||||||
String name,
|
String name,
|
||||||
int port,
|
int port,
|
||||||
String version,
|
String version,
|
||||||
@ -47,7 +45,6 @@ public abstract class ServerProperties {
|
|||||||
int maxPlayers,
|
int maxPlayers,
|
||||||
IntSupplier onlinePlayers
|
IntSupplier onlinePlayers
|
||||||
) {
|
) {
|
||||||
this.id = id;
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.port = port;
|
this.port = port;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
@ -86,10 +83,6 @@ public abstract class ServerProperties {
|
|||||||
return maxPlayers;
|
return maxPlayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServerId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getOnlinePlayers() {
|
public int getOnlinePlayers() {
|
||||||
return onlinePlayers.getAsInt();
|
return onlinePlayers.getAsInt();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ public class PluginServerPropertiesModule {
|
|||||||
@Singleton
|
@Singleton
|
||||||
ServerProperties provideServerProperties() {
|
ServerProperties provideServerProperties() {
|
||||||
return new ServerProperties(
|
return new ServerProperties(
|
||||||
"ID",
|
|
||||||
"Plugin_Server_Mock",
|
"Plugin_Server_Mock",
|
||||||
7302,
|
7302,
|
||||||
"1.13",
|
"1.13",
|
||||||
|
@ -29,7 +29,6 @@ public class SpongeServerProperties extends ServerProperties {
|
|||||||
|
|
||||||
public SpongeServerProperties(Game game) {
|
public SpongeServerProperties(Game game) {
|
||||||
super(
|
super(
|
||||||
game.getServer().getMotd().toPlain(),
|
|
||||||
"Sponge",
|
"Sponge",
|
||||||
game.getServer().getBoundAddress().orElseGet(() -> new InetSocketAddress(25565)).getPort(),
|
game.getServer().getBoundAddress().orElseGet(() -> new InetSocketAddress(25565)).getPort(),
|
||||||
game.getPlatform().getMinecraftVersion().getName(),
|
game.getPlatform().getMinecraftVersion().getName(),
|
||||||
|
@ -31,7 +31,6 @@ public class VelocityServerProperties extends ServerProperties {
|
|||||||
|
|
||||||
public VelocityServerProperties(ProxyServer server, PlanConfig config) {
|
public VelocityServerProperties(ProxyServer server, PlanConfig config) {
|
||||||
super(
|
super(
|
||||||
server.getAllServers().toString(),
|
|
||||||
"Velocity",
|
"Velocity",
|
||||||
server.getBoundAddress().getPort(),
|
server.getBoundAddress().getPort(),
|
||||||
server.getClass().getPackage().getImplementationVersion(),
|
server.getClass().getPackage().getImplementationVersion(),
|
||||||
|
Loading…
Reference in New Issue
Block a user