Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Fix Bungeecord "Team viaversion already exists in this scoreboard" and might fix #86
Dieser Commit ist enthalten in:
Ursprung
5df8a1e8e7
Commit
a769599448
@ -47,6 +47,7 @@ public class OutgoingTransformer {
|
|||||||
private final Set<Integer> knownHolograms = new HashSet<>();
|
private final Set<Integer> knownHolograms = new HashSet<>();
|
||||||
private final Map<Integer, BossBar> bossBarMap = new HashMap<>();
|
private final Map<Integer, BossBar> bossBarMap = new HashMap<>();
|
||||||
private boolean autoTeam = false;
|
private boolean autoTeam = false;
|
||||||
|
private boolean teamExists = false;
|
||||||
|
|
||||||
public OutgoingTransformer(ConnectionInfo info) {
|
public OutgoingTransformer(ConnectionInfo info) {
|
||||||
this.info = info;
|
this.info = info;
|
||||||
@ -817,19 +818,23 @@ public class OutgoingTransformer {
|
|||||||
PacketUtil.writeString("viaversion", buf); // Use viaversion as name
|
PacketUtil.writeString("viaversion", buf); // Use viaversion as name
|
||||||
if (b) {
|
if (b) {
|
||||||
// add
|
// add
|
||||||
buf.writeByte(0); // make team
|
if (!teamExists) {
|
||||||
PacketUtil.writeString("viaversion", buf);
|
buf.writeByte(0); // make team
|
||||||
PacketUtil.writeString("", buf); // prefix
|
PacketUtil.writeString("viaversion", buf);
|
||||||
PacketUtil.writeString("", buf); // suffix
|
PacketUtil.writeString("", buf); // prefix
|
||||||
buf.writeByte(0); // friendly fire
|
PacketUtil.writeString("", buf); // suffix
|
||||||
PacketUtil.writeString("", buf); // nametags
|
buf.writeByte(0); // friendly fire
|
||||||
PacketUtil.writeString("never", buf); // collision rule :)
|
PacketUtil.writeString("", buf); // nametags
|
||||||
buf.writeByte(0); // color
|
PacketUtil.writeString("never", buf); // collision rule :)
|
||||||
|
buf.writeByte(0); // color
|
||||||
|
} else
|
||||||
|
buf.writeByte(3);
|
||||||
PacketUtil.writeVarInt(1, buf); // player count
|
PacketUtil.writeVarInt(1, buf); // player count
|
||||||
PacketUtil.writeString(info.getUsername(), buf); // us
|
PacketUtil.writeString(info.getUsername(), buf); // us
|
||||||
} else {
|
} else {
|
||||||
buf.writeByte(1); // remove team
|
buf.writeByte(1); // remove team
|
||||||
}
|
}
|
||||||
|
teamExists = b;
|
||||||
info.sendRawPacket(buf);
|
info.sendRawPacket(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren