13
0
geforkt von Mirrors/Velocity
Dieser Commit ist enthalten in:
Leymooo 2020-04-27 00:09:25 +03:00
Ursprung 6555e0e337
Commit 1fb382e0f6

Datei anzeigen

@ -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));