Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-10-03 08:21:06 +02:00
fix commands with trailing whitespaces (#3878)
fixes https://github.com/GeyserMC/Geyser/issues/3877
Dieser Commit ist enthalten in:
Ursprung
eecf84e87d
Commit
6591332eb7
@ -29,7 +29,6 @@ import org.cloudburstmc.protocol.bedrock.packet.CommandRequestPacket;
|
||||
import org.geysermc.common.PlatformType;
|
||||
import org.geysermc.geyser.GeyserImpl;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.text.ChatColor;
|
||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||
import org.geysermc.geyser.translator.protocol.Translator;
|
||||
import org.geysermc.geyser.translator.text.MessageTranslator;
|
||||
@ -46,7 +45,9 @@ public class BedrockCommandRequestTranslator extends PacketTranslator<CommandReq
|
||||
return;
|
||||
}
|
||||
|
||||
session.sendCommand(command.substring(1));
|
||||
// running commands via Bedrock's command select menu adds a trailing whitespace which Java doesn't like
|
||||
// https://github.com/GeyserMC/Geyser/issues/3877
|
||||
session.sendCommand(command.substring(1).stripTrailing());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren