mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-10 20:12:29 +01:00
fix commands with trailing whitespaces (#3878)
fixes https://github.com/GeyserMC/Geyser/issues/3877
This commit is contained in:
parent
eecf84e87d
commit
6591332eb7
1 changed files with 3 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue