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.
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
private boolean mojangBanned;
|
||||
|
||||
public JavaMinecraftServer(String hostname, String ip, int port, MOTD motd, Players players,
|
||||
@NonNull Version version, Favicon favicon, ForgeModInfo modInfo, ForgeData forgeData) {
|
||||
public JavaMinecraftServer(String hostname, String ip, int port, MOTD motd, Players players, @NonNull Version version,
|
||||
Favicon favicon, ForgeModInfo modInfo, ForgeData forgeData, boolean preventsChatReports,
|
||||
boolean enforcesSecureChat, boolean previewsChat) {
|
||||
super(hostname, ip, port, motd, players);
|
||||
this.version = version;
|
||||
this.favicon = favicon;
|
||||
this.modInfo = modInfo;
|
||||
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(),
|
||||
JavaMinecraftServer.Favicon.create(token.getFavicon(), ServerUtils.getAddress(hostname, port)),
|
||||
token.getModInfo(),
|
||||
token.getForgeData()
|
||||
token.getForgeData(),
|
||||
token.isPreventsChatReports(),
|
||||
token.isEnforcesSecureChat(),
|
||||
token.isPreviewsChat()
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user