From 8c7594be51bc6053a30a111e8ac3c15acd280bce Mon Sep 17 00:00:00 2001 From: mibby Date: Sat, 27 Aug 2016 20:09:09 -0700 Subject: [PATCH] Revert PlayerKick Behavior Partial revert of 'Do not let people with already used usernames connect to the server' commit. See comments here https://github.com/Acrobot/ChestShop-3/commit/b0369d8e69c9035c29756756a3794c5277001882#commitcomment-14185778 and here. https://github.com/Acrobot/ChestShop-3/commit/c169df2265ef5aa679e47bd4f1acbd64f40cb19e#commitcomment-12846919 I personally believe ChestShops should not dictate whether a player is allowed to connect to the server or not. I personally have had issues with ChestShops kicking legitimate players from the server in online mode. --- .../ChestShop/Listeners/Player/PlayerConnect.java | 12 ------------ 1 file changed, 12 deletions(-) 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 56233f1..ec18498 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerConnect.java @@ -27,18 +27,6 @@ public class PlayerConnect implements Listener { String playerName = NameUtil.stripUsername(playerDTO.getName()); UUID uuid = NameManager.getUUID(playerName); - if (uuid != null && !playerDTO.getUniqueId().equals(uuid)) { - 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); } });