Added UUID support with player name as secondary. (#374)
This commit is contained in:
parent
95b88ea64b
commit
0f72811bfc
|
@ -175,7 +175,11 @@ public class WorldGuardPlayerListener implements Listener {
|
|||
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(':');
|
||||
|
|
Loading…
Reference in New Issue