Fixed UUID and cloak

This commit is contained in:
2026-02-23 18:51:28 +01:00
parent bbf4b17494
commit 6717d7e901
3 changed files with 5 additions and 5 deletions
@@ -71,7 +71,7 @@ public class ServiceClient {
eventHandlers(); eventHandlers();
player(uuid, username); SaturnPlayer.set(new SaturnPlayer(uuid, username, response.cloak(), response.hat()));
Cloaks.loadCloak(uuid); Cloaks.loadCloak(uuid);
@@ -165,7 +165,7 @@ public class ServiceClient {
public static void eventHandlers() { public static void eventHandlers() {
session.onNotification(ServiceMethods.EmoteEvent, (data) -> { session.onNotification(ServiceMethods.EmoteEvent, (data) -> {
for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
if (player.getUuidAsString().replace("-", "").equals(data.from())) { if (player.getUuidAsString().equals(data.from())) {
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player); AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
if (data.emote() != null && !data.emote().isEmpty()) { if (data.emote() != null && !data.emote().isEmpty()) {
if (animationStack.isActive() && animationStack.getPriority() == 1000) { if (animationStack.isActive() && animationStack.getPriority() == 1000) {
@@ -190,7 +190,7 @@ public class ServiceClient {
public static void player(UUID uuid, String name) { public static void player(UUID uuid, String name) {
try { try {
session.request(ServiceMethods.GetPlayer, uuid.toString().replaceAll("-", "")) session.request(ServiceMethods.GetPlayer, uuid.toString())
.whenComplete((user, throwable) -> { .whenComplete((user, throwable) -> {
if (throwable != null) { if (throwable != null) {
throwable.printStackTrace(); throwable.printStackTrace();
@@ -47,7 +47,7 @@ public class SaturnPlayer {
} }
public static String[] getExternalUUIDAsString() { public static String[] getExternalUUIDAsString() {
return PLAYERS.keySet().stream().filter(id -> id.equals(ServiceClient.uuid)).map(UUID::toString) return PLAYERS.keySet().stream().filter(id -> !id.equals(ServiceClient.uuid)).map(UUID::toString)
.toArray(String[]::new); .toArray(String[]::new);
} }
@@ -62,7 +62,7 @@ public class Cloaks {
*/ */
public static void setCloak(String cloakName) { public static void setCloak(String cloakName) {
if (availableCloaks.contains(cloakName)) { if (availableCloaks.contains(cloakName)) {
// setCloak(ServiceClient.uuid, cloakName); setCloak(ServiceClient.uuid, cloakName);
ServiceClient.setCloak(cloakName); ServiceClient.setCloak(cloakName);
} }
} }