3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-23 23:00:35 +01:00

Use default shutdown reason if the disconnect message is blank.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-30 06:01:38 -04:00
Ursprung 4c5636e6f7
Commit 306221a92f

Datei anzeigen

@ -15,7 +15,11 @@ public class ShutdownCommand implements RawCommand {
@Override
public void execute(final Invocation invocation) {
String reason = invocation.arguments();
server.shutdown(true, LegacyComponentSerializer.legacy('&').deserialize(reason));
if (reason.isEmpty() || reason.trim().isEmpty()) {
server.shutdown(true);
} else {
server.shutdown(true, LegacyComponentSerializer.legacy('&').deserialize(reason));
}
}
@Override