diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java index 5fab0cd..8e7c9df 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java @@ -1,6 +1,8 @@ package com.Acrobot.ChestShop.Listeners.Player; +import com.Acrobot.ChestShop.ChestShop; import com.Acrobot.ChestShop.UUIDs.NameManager; +import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; @@ -10,7 +12,12 @@ import org.bukkit.event.player.PlayerJoinEvent; */ public class PlayerConnect implements Listener { @EventHandler - public static void onPlayerConnect(PlayerJoinEvent event) { - NameManager.storeUsername(event.getPlayer()); + public static void onPlayerConnect(final PlayerJoinEvent event) { + Bukkit.getScheduler().runTaskAsynchronously(ChestShop.getPlugin(), new Runnable() { + @Override + public void run() { + NameManager.storeUsername(event.getPlayer()); + } + }); } }