Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 00:22:53 +01:00
fix actionbar color
Dieser Commit ist enthalten in:
Ursprung
7b9cde9946
Commit
8519ad8cf1
@ -17,6 +17,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||
import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
||||
import us.myles.ViaVersion.api.type.Type;
|
||||
import us.myles.ViaVersion.packets.State;
|
||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter;
|
||||
|
||||
public class PlayerPackets1_11 {
|
||||
private static final ValueTransformer<Short, Float> toNewFloat = new ValueTransformer<Short, Float>(Type.FLOAT) {
|
||||
@ -44,7 +45,10 @@ public class PlayerPackets1_11 {
|
||||
if (action == 2) {
|
||||
// Convert to the old actionbar way
|
||||
PacketWrapper actionbar = new PacketWrapper(0x0F, null, wrapper.user()); // Chat Message packet
|
||||
actionbar.write(Type.STRING, wrapper.read(Type.STRING));
|
||||
String msg = wrapper.read(Type.STRING);
|
||||
msg = ChatRewriter.jsonTextToLegacy(msg);
|
||||
msg = "{\"text\":\"" + msg + "\"}";
|
||||
actionbar.write(Type.STRING, msg);
|
||||
actionbar.write(Type.BYTE, (byte) 2); // Above hotbar
|
||||
|
||||
actionbar.send(Protocol1_10To1_11.class);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren