Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 13:30:17 +01:00
Use default shutdown reason if the disconnect message is blank.
Dieser Commit ist enthalten in:
Ursprung
4c5636e6f7
Commit
306221a92f
@ -15,8 +15,12 @@ public class ShutdownCommand implements RawCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(final Invocation invocation) {
|
public void execute(final Invocation invocation) {
|
||||||
String reason = invocation.arguments();
|
String reason = invocation.arguments();
|
||||||
|
if (reason.isEmpty() || reason.trim().isEmpty()) {
|
||||||
|
server.shutdown(true);
|
||||||
|
} else {
|
||||||
server.shutdown(true, LegacyComponentSerializer.legacy('&').deserialize(reason));
|
server.shutdown(true, LegacyComponentSerializer.legacy('&').deserialize(reason));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(final Invocation invocation) {
|
public boolean hasPermission(final Invocation invocation) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren