geforkt von Mirrors/Velocity
fix logic
Dieser Commit ist enthalten in:
Ursprung
6555e0e337
Commit
1fb382e0f6
@ -128,15 +128,13 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
server.getCommandManager().callCommandEvent(player, msg.substring(1))
|
||||
.thenAcceptAsync(event -> {
|
||||
CommandExecuteEvent.CommandResult commandResult = event.getResult();
|
||||
if (commandResult.isAllowed()) {
|
||||
Optional<String> eventCommand = event.getResult().getCommand();
|
||||
String command = eventCommand.orElse(event.getCommand());
|
||||
|
||||
if (commandResult.isForwardToServer()) {
|
||||
smc.write(Chat.createServerbound(command));
|
||||
return;
|
||||
}
|
||||
|
||||
if (commandResult.isAllowed()) {
|
||||
try {
|
||||
if (!server.getCommandManager().execute(player, command)) {
|
||||
smc.write(Chat.createServerbound(command));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren