SteamWar/SpigotCore
Archiviert
13
0

Hotfix scoreboard

Dieser Commit ist enthalten in:
Lixfel 2020-11-30 06:26:53 +01:00
Ursprung 3434335b19
Commit 0de9f9bb06

Datei anzeigen

@ -93,7 +93,18 @@ public class SWScoreboard {
PacketContainer packet = manager.createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
packet.getStrings().write(0, SIDEBAR + toggle);
packet.getIntegers().write(0, 0); //0 to create
packet.getChatComponents().write(0, WrappedChatComponent.fromText(name));
switch(Core.getVersion()){
case 8:
case 9:
case 10:
case 12:
packet.getStrings().write(1, SIDEBAR + toggle);
break;
case 14:
case 15:
default:
packet.getChatComponents().write(0, WrappedChatComponent.fromText(name));
}
packet.getEnumModifier(RenderType.class, 2).write(0, RenderType.INTEGER);
return packet;
}