Only update player name on join, don't create new accounts

This commit is contained in:
Phoenix616 2020-06-19 20:57:22 +01:00
parent 0b39fd1a5e
commit 1f8fd09dd2

View File

@ -23,12 +23,8 @@ public class PlayerConnect implements Listener {
final PlayerDTO playerDTO = new PlayerDTO(event.getPlayer());
Bukkit.getScheduler().runTaskAsynchronously(ChestShop.getPlugin(), new Runnable() {
@Override
public void run() {
// String playerName = NameUtil.stripUsername(playerDTO.getName());
// UUID uuid = NameManager.getUUID(playerName);
Bukkit.getScheduler().runTaskAsynchronously(ChestShop.getPlugin(), () -> {
if (NameManager.getAccount(playerDTO.getUniqueId()) != null) {
NameManager.storeUsername(playerDTO);
}
});