Bring back language in trace, except it actually works now (#10420)
* Re-added 'language' in trace info (it actually works now) * Updated c locale --------- Co-authored-by: buj <buj351@outlook.com>
This commit is contained in:
@@ -815,7 +815,7 @@ public class NetServer implements ApplicationListener{
|
||||
}
|
||||
case trace -> {
|
||||
PlayerInfo stats = netServer.admins.getInfo(other.uuid());
|
||||
TraceInfo info = new TraceInfo(other.con.address, other.uuid(), other.con.modclient, other.con.mobile, stats.timesJoined, stats.timesKicked, stats.ips.toArray(String.class), stats.names.toArray(String.class));
|
||||
TraceInfo info = new TraceInfo(other.con.address, other.uuid(), other.locale, other.con.modclient, other.con.mobile, stats.timesJoined, stats.timesKicked, stats.ips.toArray(String.class), stats.names.toArray(String.class));
|
||||
if(player.con != null){
|
||||
Call.traceInfo(player.con, other, info);
|
||||
}else{
|
||||
|
||||
@@ -955,6 +955,7 @@ public class TypeIO{
|
||||
public static void writeTraceInfo(Writes write, TraceInfo trace){
|
||||
writeString(write, trace.ip);
|
||||
writeString(write, trace.uuid);
|
||||
writeString(write, trace.locale);
|
||||
write.b(trace.modded ? (byte)1 : 0);
|
||||
write.b(trace.mobile ? (byte)1 : 0);
|
||||
write.i(trace.timesJoined);
|
||||
@@ -965,7 +966,7 @@ public class TypeIO{
|
||||
}
|
||||
|
||||
public static TraceInfo readTraceInfo(Reads read){
|
||||
return new TraceInfo(readString(read), readString(read), read.b() == 1, read.b() == 1, read.i(), read.i(), readStrings(read), readStrings(read));
|
||||
return new TraceInfo(readString(read), readString(read), readString(read), read.b() == 1, read.b() == 1, read.i(), read.i(), readStrings(read), readStrings(read));
|
||||
}
|
||||
|
||||
public static void writeStrings(Writes write, String[] strings, int maxLen){
|
||||
|
||||
@@ -628,14 +628,15 @@ public class Administration{
|
||||
}
|
||||
|
||||
public static class TraceInfo{
|
||||
public String ip, uuid;
|
||||
public String ip, uuid, locale;
|
||||
public boolean modded, mobile;
|
||||
public int timesJoined, timesKicked;
|
||||
public String[] ips, names;
|
||||
|
||||
public TraceInfo(String ip, String uuid, boolean modded, boolean mobile, int timesJoined, int timesKicked, String[] ips, String[] names){
|
||||
public TraceInfo(String ip, String uuid, String locale, boolean modded, boolean mobile, int timesJoined, int timesKicked, String[] ips, String[] names){
|
||||
this.ip = ip;
|
||||
this.uuid = uuid;
|
||||
this.locale = locale;
|
||||
this.modded = modded;
|
||||
this.mobile = mobile;
|
||||
this.timesJoined = timesJoined;
|
||||
|
||||
@@ -34,6 +34,8 @@ public class TraceDialog extends BaseDialog{
|
||||
c.add(Core.bundle.format("trace.playername", player.name)).row();
|
||||
c.button(Icon.copySmall, style, () -> copy(info.ip)).size(s).padRight(4f);
|
||||
c.add(Core.bundle.format("trace.ip", info.ip)).row();
|
||||
c.button(Icon.copySmall, style, () -> copy(info.locale)).size(s).padRight(4f);
|
||||
c.add(Core.bundle.format("trace.language", info.locale)).row();
|
||||
c.button(Icon.copySmall, style, () -> copy(info.uuid)).size(s).padRight(4f);
|
||||
c.add(Core.bundle.format("trace.id", info.uuid)).row();
|
||||
}).row();
|
||||
|
||||
Reference in New Issue
Block a user