mirror of
https://github.com/kaboomserver/extras.git
synced 2025-02-11 03:29:50 +00:00
Update ping info to 1.16.1
This commit is contained in:
parent
e184b0c3bf
commit
55e588aa9f
3 changed files with 10 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue