3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00

fix: players being invisible

Dieser Commit ist enthalten in:
Timongcraft 2024-10-09 14:14:02 +02:00
Ursprung eb8882cde6
Commit 35d25f770b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 238806DB2AE97C37
3 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -187,7 +187,7 @@ public class KeyedVelocityTabList implements InternalTabList {
Set.of(action), Set.of(action),
Collections.unmodifiableList(entries) Collections.unmodifiableList(entries)
) )
).thenAcceptAsync(event -> { ).thenAccept(event -> {
if (event.getResult().isAllowed()) { if (event.getResult().isAllowed()) {
if (event.getResult().getIds().isEmpty()) { if (event.getResult().getIds().isEmpty()) {
boolean rewrite = false; boolean rewrite = false;
@ -242,7 +242,7 @@ public class KeyedVelocityTabList implements InternalTabList {
} }
} }
} }
}); }).join();
} }
protected ServerUpdateTabListEvent.@Nullable Action mapToEventAction(int action) { protected ServerUpdateTabListEvent.@Nullable Action mapToEventAction(int action) {

Datei anzeigen

@ -225,7 +225,7 @@ public class VelocityTabList implements InternalTabList {
proxyServer.getEventManager().fire(new ServerUpdateTabListEvent(player, proxyServer.getEventManager().fire(new ServerUpdateTabListEvent(player,
Collections.unmodifiableSet(mapToEventActions(infoPacket.getActions())), Collections.unmodifiableSet(mapToEventActions(infoPacket.getActions())),
Collections.unmodifiableList(entries)) Collections.unmodifiableList(entries))
).thenAcceptAsync(event -> { ).thenAccept(event -> {
if (event.getResult().isAllowed()) { if (event.getResult().isAllowed()) {
if (event.getResult().getIds().isEmpty()) { if (event.getResult().getIds().isEmpty()) {
boolean rewrite = false; boolean rewrite = false;
@ -258,7 +258,7 @@ public class VelocityTabList implements InternalTabList {
} }
} }
} }
}); }).join();
} }
protected UpsertPlayerInfoPacket.Entry createRawEntry(VelocityTabListEntry entry) { protected UpsertPlayerInfoPacket.Entry createRawEntry(VelocityTabListEntry entry) {
@ -456,7 +456,7 @@ public class VelocityTabList implements InternalTabList {
Set.of(ServerUpdateTabListEvent.Action.REMOVE_PLAYER), Set.of(ServerUpdateTabListEvent.Action.REMOVE_PLAYER),
Collections.unmodifiableList(entries) Collections.unmodifiableList(entries)
) )
).thenAcceptAsync(event -> { ).thenAccept(event -> {
if (event.getResult().isAllowed()) { if (event.getResult().isAllowed()) {
if (event.getResult().getIds().isEmpty()) { if (event.getResult().getIds().isEmpty()) {
for (UUID uuid : infoPacket.getProfilesToRemove()) { for (UUID uuid : infoPacket.getProfilesToRemove()) {
@ -476,6 +476,6 @@ public class VelocityTabList implements InternalTabList {
this.connection.write(new RemovePlayerInfoPacket(uuids)); this.connection.write(new RemovePlayerInfoPacket(uuids));
} }
} }
}); }).join();
} }
} }

Datei anzeigen

@ -96,7 +96,7 @@ public class VelocityTabListLegacy extends KeyedVelocityTabList {
Set.of(action), Set.of(action),
Collections.singletonList(entry) Collections.singletonList(entry)
) )
).thenAcceptAsync(event -> { ).thenAccept(event -> {
if (event.getResult().isAllowed()) { if (event.getResult().isAllowed()) {
if (event.getResult().getIds().isEmpty()) { if (event.getResult().getIds().isEmpty()) {
if (entry.isRewrite()) { if (entry.isRewrite()) {
@ -134,7 +134,7 @@ public class VelocityTabListLegacy extends KeyedVelocityTabList {
} }
} }
} }
}); }).join();
} }
private UpdateEventTabListEntry mapToEventEntry(int action, LegacyPlayerListItemPacket.Item packetItem) { private UpdateEventTabListEntry mapToEventEntry(int action, LegacyPlayerListItemPacket.Item packetItem) {