mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
address review
This commit is contained in:
parent
5e25da1887
commit
04d9024664
2 changed files with 5 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ public class BedrockCommandRequestTranslator extends PacketTranslator<CommandReq
|
|||
handleCommand(session, MessageTranslator.normalizeSpace(command).substring(1));
|
||||
}
|
||||
|
||||
public static void handleCommand(GeyserSession session, String command) {
|
||||
static void handleCommand(GeyserSession session, String command) {
|
||||
if (!(session.getGeyser().getPlatformType() == PlatformType.STANDALONE
|
||||
&& GeyserImpl.getInstance().commandManager().runCommand(session, command))) {
|
||||
if (MessageTranslator.isTooLong(command, session)) {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public class MessageTranslator {
|
|||
// Reset character
|
||||
private static final String RESET = BASE + "r";
|
||||
|
||||
private static final char CHAR_NON_BREAKING_SPACE = 160;
|
||||
private static final char CHAR_SPACE = 32;
|
||||
|
||||
static {
|
||||
TEAM_COLORS.put(TeamColor.RESET, RESET);
|
||||
|
||||
|
|
@ -409,7 +412,7 @@ public class MessageTranslator {
|
|||
whitespacesCount++;
|
||||
} else {
|
||||
startWhitespaces = false;
|
||||
newChars[count++] = (actualChar == 160 ? 32 : actualChar);
|
||||
newChars[count++] = (actualChar == CHAR_NON_BREAKING_SPACE ? CHAR_SPACE : actualChar);
|
||||
whitespacesCount = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue