Update ping info to 1.16.1

This commit is contained in:
mathiascode 2020-07-16 02:14:59 +03:00
parent e184b0c3bf
commit 55e588aa9f
3 changed files with 10 additions and 2 deletions

View file

@ -120,6 +120,9 @@ public final class Main extends JavaPlugin {
@Override
public void onDisable() {
if (Bukkit.isStopping()) {
/* This should never be done in a critical environment, as it can lead to data corruption.
We are not too concerned with data corruption, as the server resets daily. In our case, it's
more important to ensure that the server never hangs. */
Runtime.getRuntime().halt(0);
}
}

View file

@ -111,6 +111,11 @@ public final class ServerCommand implements Listener {
} catch (NumberFormatException exception) {
// Do nothing
}
if (command.contains("[distance=")) {
return command.replace("[distance=", "[");
}
return null;
}

View file

@ -9,11 +9,11 @@ public final class ServerPing implements Listener {
@EventHandler
void onServerListPing(final PaperServerListPingEvent event) {
if (event.getClient().getProtocolVersion() == -1) {
final int protocol = 578;
final int protocol = 736;
event.setProtocolVersion(protocol);
} else {
event.setProtocolVersion(event.getClient().getProtocolVersion());
}
event.setVersion("1.15.2");
event.setVersion("1.16.1");
}
}