Explorar el Código

These are the wrong way round

The UUID's are the keys, not the names
Bestle hace 10 años
padre
commit
ec1a125809
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/main/java/com/gmail/nossr50/datatypes/party/Party.java

+ 2 - 2
src/main/java/com/gmail/nossr50/datatypes/party/Party.java

@@ -306,11 +306,11 @@ public class Party {
     }
 
     public boolean hasMember(String memberName) {
-        return this.getMembers().keySet().contains(memberName);
+        return this.getMembers().values().contains(memberName);
     }
 
     public boolean hasMember(UUID uuid) {
-        return this.getMembers().values().contains(uuid);
+        return this.getMembers().keySet().contains(uuid);
     }
 
     public String createMembersList(String playerName, List<Player> nearMembers) {