Minor changes.

Added message boolean on NPCLib instantiation and removed notice from README.
This commit is contained in:
JitseB
2018-05-05 19:34:00 +02:00
parent 1143398b2a
commit d73a4dd5d2
2 changed files with 13 additions and 8 deletions
@@ -26,6 +26,10 @@ public class NPCLib {
private final Class<?> npcClass;
public NPCLib(JavaPlugin plugin) {
this(plugin, true);
}
public NPCLib(JavaPlugin plugin, boolean message) {
this.plugin = plugin;
this.server = plugin.getServer();
@@ -35,8 +39,8 @@ public class NPCLib {
try {
npcClass = Class.forName("net.jitse.npclib.nms." + versionName + ".NPC_" + versionName);
} catch (ClassNotFoundException e) {
// Version not supported, error below
} catch (ClassNotFoundException exception) {
// Version not supported, error below.
}
this.npcClass = npcClass;
@@ -47,7 +51,9 @@ public class NPCLib {
return;
}
server.getConsoleSender().sendMessage(ChatColor.BLUE + "[NPCLib] " + ChatColor.WHITE + "Enabled for version " + versionName + ".");
if (message) {
server.getConsoleSender().sendMessage(ChatColor.BLUE + "[NPCLib] " + ChatColor.WHITE + "Enabled for version " + versionName + ".");
}
registerInternal();
}