mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 18:45:31 +01:00
Should fix the lag, hopefully
This commit is contained in:
parent
02673dec94
commit
cd3781c26c
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user