Checkstyle: Add 'WhitespaceAfter' check, fix some violations

This commit is contained in:
ljacqu
2018-09-01 08:38:14 +02:00
parent e2e2c6bb79
commit 58e04556ee
11 changed files with 24 additions and 22 deletions
@@ -157,16 +157,16 @@ public class ValidationService implements Reloadable {
String ip = PlayerUtils.getPlayerIp(player);
String domain = player.getAddress().getHostName();
for(String restriction : restrictions) {
if(restriction.startsWith("regex:")) {
for (String restriction : restrictions) {
if (restriction.startsWith("regex:")) {
restriction = restriction.replace("regex:", "");
} else {
restriction = restriction.replaceAll("\\*","(.*)");
restriction = restriction.replace("*", "(.*)");
}
if(ip.matches(restriction)) {
if (ip.matches(restriction)) {
return true;
}
if(domain.matches(restriction)) {
if (domain.matches(restriction)) {
return true;
}
}
@@ -99,7 +99,8 @@ public class BungeeReceiver implements PluginMessageListener, SettingsDependent
try {
argument = in.readUTF();
} catch (IllegalStateException e) {
ConsoleLogger.warning("Received invalid plugin message of type " + type.get().name() + ": argument is missing!");
ConsoleLogger.warning("Received invalid plugin message of type " + type.get().name()
+ ": argument is missing!");
return;
}