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))
|
server.getCommandManager().callCommandEvent(player, msg.substring(1))
|
||||||
.thenAcceptAsync(event -> {
|
.thenAcceptAsync(event -> {
|
||||||
CommandExecuteEvent.CommandResult commandResult = event.getResult();
|
CommandExecuteEvent.CommandResult commandResult = event.getResult();
|
||||||
|
Optional<String> eventCommand = event.getResult().getCommand();
|
||||||
|
String command = eventCommand.orElse(event.getCommand());
|
||||||
|
if (commandResult.isForwardToServer()) {
|
||||||
|
smc.write(Chat.createServerbound(command));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (commandResult.isAllowed()) {
|
if (commandResult.isAllowed()) {
|
||||||
Optional<String> eventCommand = event.getResult().getCommand();
|
|
||||||
String command = eventCommand.orElse(event.getCommand());
|
|
||||||
|
|
||||||
if (commandResult.isForwardToServer()) {
|
|
||||||
smc.write(Chat.createServerbound(command));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!server.getCommandManager().execute(player, command)) {
|
if (!server.getCommandManager().execute(player, command)) {
|
||||||
smc.write(Chat.createServerbound(command));
|
smc.write(Chat.createServerbound(command));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren