Trivial code householding

- Replace `if (!x) ... else ...` with `if(x) ... else ...`
- Avoid throwing RuntimeException; use children
This commit is contained in:
ljacqu
2016-05-30 12:18:55 +02:00
parent 9349993faf
commit 9b1ee86b2f
19 changed files with 77 additions and 82 deletions
@@ -158,7 +158,7 @@ public class BukkitService {
} else if (obj instanceof Player[]) {
return Arrays.asList((Player[]) obj);
} else {
String type = (obj != null) ? obj.getClass().getName() : "null";
String type = (obj == null) ? "null" : obj.getClass().getName();
ConsoleLogger.showError("Unknown list of online players of type " + type);
}
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {