add more data to the java server pinger
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m29s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m29s
This commit is contained in:
parent
cd3738a2b9
commit
795c97401c
@ -47,4 +47,23 @@ public final class JavaServerStatusToken {
|
|||||||
* The favicon of the server.
|
* The favicon of the server.
|
||||||
*/
|
*/
|
||||||
private final String favicon;
|
private final String favicon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server prevents chat reports.
|
||||||
|
*/
|
||||||
|
private boolean preventsChatReports;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server enforces secure chat.
|
||||||
|
*/
|
||||||
|
private boolean enforcesSecureChat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server has previews chat enabled.
|
||||||
|
* <p>
|
||||||
|
* Chat Preview sends chat messages to the server as they are typed, even before they're sent.
|
||||||
|
* <a href="https://www.minecraft.net/es-mx/article/minecraft-snapshot-22w19a">More information</a>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
private boolean previewsChat;
|
||||||
}
|
}
|
||||||
|
@ -40,18 +40,41 @@ public final class JavaMinecraftServer extends MinecraftServer {
|
|||||||
*/
|
*/
|
||||||
private ForgeData forgeData;
|
private ForgeData forgeData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server prevents chat reports.
|
||||||
|
*/
|
||||||
|
private boolean preventsChatReports;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server enforces secure chat.
|
||||||
|
*/
|
||||||
|
private boolean enforcesSecureChat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the server has previews chat enabled.
|
||||||
|
* <p>
|
||||||
|
* Chat Preview sends chat messages to the server as they are typed, even before they're sent.
|
||||||
|
* <a href="https://www.minecraft.net/es-mx/article/minecraft-snapshot-22w19a">More information</a>
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
private boolean previewsChat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mojang banned status of the server.
|
* The mojang banned status of the server.
|
||||||
*/
|
*/
|
||||||
private boolean mojangBanned;
|
private boolean mojangBanned;
|
||||||
|
|
||||||
public JavaMinecraftServer(String hostname, String ip, int port, MOTD motd, Players players,
|
public JavaMinecraftServer(String hostname, String ip, int port, MOTD motd, Players players, @NonNull Version version,
|
||||||
@NonNull Version version, Favicon favicon, ForgeModInfo modInfo, ForgeData forgeData) {
|
Favicon favicon, ForgeModInfo modInfo, ForgeData forgeData, boolean preventsChatReports,
|
||||||
|
boolean enforcesSecureChat, boolean previewsChat) {
|
||||||
super(hostname, ip, port, motd, players);
|
super(hostname, ip, port, motd, players);
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.favicon = favicon;
|
this.favicon = favicon;
|
||||||
this.modInfo = modInfo;
|
this.modInfo = modInfo;
|
||||||
this.forgeData = forgeData;
|
this.forgeData = forgeData;
|
||||||
|
this.preventsChatReports = preventsChatReports;
|
||||||
|
this.enforcesSecureChat = enforcesSecureChat;
|
||||||
|
this.previewsChat = previewsChat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,7 +101,10 @@ public final class JavaMinecraftServer extends MinecraftServer {
|
|||||||
token.getVersion().detailedCopy(),
|
token.getVersion().detailedCopy(),
|
||||||
JavaMinecraftServer.Favicon.create(token.getFavicon(), ServerUtils.getAddress(hostname, port)),
|
JavaMinecraftServer.Favicon.create(token.getFavicon(), ServerUtils.getAddress(hostname, port)),
|
||||||
token.getModInfo(),
|
token.getModInfo(),
|
||||||
token.getForgeData()
|
token.getForgeData(),
|
||||||
|
token.isPreventsChatReports(),
|
||||||
|
token.isEnforcesSecureChat(),
|
||||||
|
token.isPreviewsChat()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user