#534 Send error if name is restricted (this time for real)

This commit is contained in:
ljacqu 2016-02-20 07:26:58 +01:00
parent 374113ff01
commit 614d544edf

View File

@ -64,16 +64,17 @@ public class AsynchronousJoin {
final String ip = plugin.getIP(player);
if (Settings.isAllowRestrictedIp && !isNameRestricted(name, ip, player.getAddress().getHostName())) {
if (Settings.isAllowRestrictedIp && isNameRestricted(name, ip, player.getAddress().getHostName())) {
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
@Override
public void run() {
AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true);
player.kickPlayer(m.retrieveSingle(MessageKey.NOT_OWNER_ERROR));
if (Settings.banUnsafeIp)
if (Settings.banUnsafeIp) {
plugin.getServer().banIP(ip);
}
}
});
return;
}