some toString() changes

This commit is contained in:
Andrew Steinborn
2018-09-29 16:22:50 -04:00
parent 33a2cb7bad
commit 1da1382b16
3 changed files with 20 additions and 9 deletions

View File

@@ -23,9 +23,7 @@ public final class LegacyChannelIdentifier implements ChannelIdentifier {
@Override
public String toString() {
return "LegacyChannelIdentifier{" +
"name='" + name + '\'' +
'}';
return name + " (legacy)";
}
@Override

View File

@@ -54,10 +54,7 @@ public final class MinecraftChannelIdentifier implements ChannelIdentifier {
@Override
public String toString() {
return "MinecraftChannelIdentifier{" +
"namespace='" + namespace + '\'' +
", name='" + name + '\'' +
'}';
return getId() + " (modern)";
}
@Override

View File

@@ -164,8 +164,8 @@ public final class ServerPing {
}
public ServerPing build() {
return new ServerPing(version, nullOutPlayers ? null : new Players(onlinePlayers, maximumPlayers, samplePlayers), description, favicon,
nullOutModinfo ? null : new ModInfo(modType, mods));
return new ServerPing(version, nullOutPlayers ? null : new Players(onlinePlayers, maximumPlayers, samplePlayers),
description, favicon, nullOutModinfo ? null : new ModInfo(modType, mods));
}
public Version getVersion() {
@@ -320,6 +320,14 @@ public final class ServerPing {
public List<Mod> getMods() {
return modList;
}
@Override
public String toString() {
return "ModInfo{" +
"type='" + type + '\'' +
", modList=" + modList +
'}';
}
}
public static final class Mod {
@@ -338,5 +346,13 @@ public final class ServerPing {
public String getVersion() {
return version;
}
@Override
public String toString() {
return "Mod{" +
"id='" + id + '\'' +
", version='" + version + '\'' +
'}';
}
}
}