mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Prevent duplicate profiles from being created
This commit is contained in:
parent
80526c0e06
commit
06c3a588bf
@ -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());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user