Move more complex initializations from main class to Initializer helper (tentative)

This commit is contained in:
ljacqu
2016-08-12 22:04:56 +02:00
parent 5d2da7bd82
commit 02ca2d18b9
6 changed files with 262 additions and 217 deletions
@@ -57,4 +57,20 @@ public final class Utils {
public static String getPlayerIp(Player p) {
return p.getAddress().getAddress().getHostAddress();
}
/**
* Returns whether the class exists in the current class loader.
*
* @param className the class name to check
*
* @return true if the class is loaded, false otherwise
*/
public static boolean isClassLoaded(String className) {
try {
Class.forName(className);
return true;
} catch (ClassNotFoundException e) {
return false;
}
}
}