mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-16 04:24:43 +02:00
Prevent duplicate profiles from being created
This commit is contained in:
@ -105,7 +105,7 @@ public class Users {
|
|||||||
* @return the player's profile
|
* @return the player's profile
|
||||||
*/
|
*/
|
||||||
public static PlayerProfile getProfileByName(String playerName) {
|
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) {
|
if (players.get(playerName.toLowerCase()) != null) {
|
||||||
return players.get(playerName.toLowerCase());
|
return players.get(playerName.toLowerCase());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user