Cleanup some code (fix warns, fix NPE, remove duplicates)

This commit is contained in:
MrMicky
2020-02-19 14:57:07 +01:00
parent a6667129c9
commit fbf4b46858
35 changed files with 169 additions and 573 deletions
@@ -39,8 +39,7 @@ public final class NPCLib {
this.npcClass = npcClass;
if (npcClass == null) {
logger.severe("Failed to initiate. Your server's version ("
+ versionName + ") is not supported");
logger.severe("Failed to initiate. Your server's version (" + versionName + ") is not supported");
return;
}
@@ -96,7 +95,7 @@ public final class NPCLib {
try {
return (NPC) npcClass.getConstructors()[0].newInstance(this, text);
} catch (Exception exception) {
logger.warning("Failed to create NPC. Please report the following stacktrace message: " + exception.getMessage());
logger.warning("Failed to create NPC. Please report the following stacktrace message", exception);
}
return null;