3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-09-29 06:30:16 +02:00

fix command forwarding

Dieser Commit ist enthalten in:
Leymooo 2020-04-29 22:08:59 +03:00
Ursprung 9d6689f64a
Commit aa55af8eb7

Datei anzeigen

@ -131,13 +131,13 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
Optional<String> eventCommand = event.getResult().getCommand();
String command = eventCommand.orElse(event.getCommand());
if (commandResult.isForwardToServer()) {
smc.write(Chat.createServerbound(command));
smc.write(Chat.createServerbound("/" + command));
return;
}
if (commandResult.isAllowed()) {
try {
if (!server.getCommandManager().executeImmediately(player, command)) {
smc.write(Chat.createServerbound(command));
smc.write(Chat.createServerbound("/" + command));
}
} catch (Exception e) {
logger.info("Exception occurred while running command for {}", player.getUsername(),