Merge pull request #2 from Acrobot/master

Up
This commit is contained in:
Gabriele C 2016-04-05 22:07:39 +02:00
commit b040eafcc1
1 changed files with 9 additions and 3 deletions

View File

@ -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);