forked from GeyserMC/Geyser
Fix scoreboard prefix/suffix translation errors (#929)
Uses getTranslatedBedrockMessage() instead of getBedrockMessage(). Fixes #923.
This commit is contained in:
parent
5e664882b1
commit
3e0cb28a63
1 changed files with 4 additions and 4 deletions
|
@ -54,15 +54,15 @@ public class JavaTeamTranslator extends PacketTranslator<ServerTeamPacket> {
|
||||||
scoreboard.registerNewTeam(packet.getTeamName(), toPlayerSet(packet.getPlayers()))
|
scoreboard.registerNewTeam(packet.getTeamName(), toPlayerSet(packet.getPlayers()))
|
||||||
.setName(MessageUtils.getBedrockMessage(packet.getDisplayName()))
|
.setName(MessageUtils.getBedrockMessage(packet.getDisplayName()))
|
||||||
.setColor(packet.getColor())
|
.setColor(packet.getColor())
|
||||||
.setPrefix(MessageUtils.getBedrockMessage(packet.getPrefix()))
|
.setPrefix(MessageUtils.getTranslatedBedrockMessage(packet.getPrefix(), session.getClientData().getLanguageCode()))
|
||||||
.setSuffix(MessageUtils.getBedrockMessage(packet.getSuffix()));
|
.setSuffix(MessageUtils.getTranslatedBedrockMessage(packet.getSuffix(), session.getClientData().getLanguageCode()));
|
||||||
break;
|
break;
|
||||||
case UPDATE:
|
case UPDATE:
|
||||||
if (team != null) {
|
if (team != null) {
|
||||||
team.setName(MessageUtils.getBedrockMessage(packet.getDisplayName()))
|
team.setName(MessageUtils.getBedrockMessage(packet.getDisplayName()))
|
||||||
.setColor(packet.getColor())
|
.setColor(packet.getColor())
|
||||||
.setPrefix(MessageUtils.getBedrockMessage(packet.getPrefix()))
|
.setPrefix(MessageUtils.getTranslatedBedrockMessage(packet.getPrefix(), session.getClientData().getLanguageCode()))
|
||||||
.setSuffix(MessageUtils.getBedrockMessage(packet.getSuffix()))
|
.setSuffix(MessageUtils.getTranslatedBedrockMessage(packet.getSuffix(), session.getClientData().getLanguageCode()))
|
||||||
.setUpdateType(UpdateType.UPDATE);
|
.setUpdateType(UpdateType.UPDATE);
|
||||||
} else {
|
} else {
|
||||||
GeyserConnector.getInstance().getLogger().error(LanguageUtils.getLocaleStringLog("geyser.network.translator.team.failed_not_registered", packet.getAction(), packet.getTeamName()));
|
GeyserConnector.getInstance().getLogger().error(LanguageUtils.getLocaleStringLog("geyser.network.translator.team.failed_not_registered", packet.getAction(), packet.getTeamName()));
|
||||||
|
|
Loading…
Reference in a new issue