Added UUID support with player name as secondary. (#374)

This commit is contained in:
Mitchell Cook 2018-01-21 15:29:16 +10:00 committed by Wizjany
parent 95b88ea64b
commit 0f72811bfc
2 changed files with 5 additions and 1 deletions

0
gradlew vendored Normal file → Executable file
View File

View File

@ -175,7 +175,11 @@ public void onPlayerLogin(PlayerLoginEvent event) {
Player player = event.getPlayer();
ConfigurationManager cfg = plugin.getGlobalStateManager();
String hostKey = cfg.hostKeys.get(player.getName().toLowerCase());
String hostKey = cfg.hostKeys.get(player.getUniqueId().toString());
if (hostKey == null) {
hostKey = cfg.hostKeys.get(player.getName().toLowerCase());
}
if (hostKey != null) {
String hostname = event.getHostname();
int colonIndex = hostname.indexOf(':');