Explorar el Código

Prevent duplicate profiles from being created

nossr50 hace 13 años
padre
commit
06c3a588bf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/main/java/com/gmail/nossr50/Users.java

+ 1 - 1
src/main/java/com/gmail/nossr50/Users.java

@@ -105,7 +105,7 @@ public class Users {
      * @return the player's profile
      */
     public static PlayerProfile getProfileByName(String playerName) {
-        if (Bukkit.getServer().getOfflinePlayer(playerName).isOnline()) {
+        if (Bukkit.getServer().getOfflinePlayer(playerName).isOnline() || players.containsKey(playerName.toLowerCase())) {
             if (players.get(playerName.toLowerCase()) != null) {
                 return players.get(playerName.toLowerCase());
             }