mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 04:25:14 +01:00
commit
b040eafcc1
@ -28,9 +28,15 @@ public class PlayerConnect implements Listener {
|
||||
UUID uuid = NameManager.getUUID(playerName);
|
||||
|
||||
if (uuid != null && !playerDTO.getUniqueId().equals(uuid)) {
|
||||
Bukkit.getPlayer(playerDTO.getUniqueId()).kickPlayer("[ChestShop]" +
|
||||
"Unfortunately, this username was already used by " +
|
||||
"another player.");
|
||||
Bukkit.getScheduler().runTask(ChestShop.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Bukkit.getPlayer(playerDTO.getUniqueId()).kickPlayer("[ChestShop]" +
|
||||
"Unfortunately, this username was already used by " +
|
||||
"another player.");
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
NameManager.storeUsername(playerDTO);
|
||||
|
Loading…
Reference in New Issue
Block a user