mirror of
https://github.com/asofold/CompatNoCheatPlus.git
synced 2024-11-24 12:16:46 +01:00
onEnable: Log an error if NCP is not there or already enabled. Spaces.
This commit is contained in:
parent
94fd56e66f
commit
21d54b48a4
@ -246,6 +246,15 @@ public class CompatNoCheatPlus extends JavaPlugin implements Listener {
|
||||
// Start ticktask 2
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new TickTask2(), 1, 1);
|
||||
|
||||
// Check for the NoCheatPlus plugin.
|
||||
Plugin plugin = pm.getPlugin("NoCheatPlus");
|
||||
if (plugin == null) {
|
||||
getLogger().severe("[CompatNoCheatPlus] The NoCheatPlus plugin is not present.");
|
||||
}
|
||||
else if (plugin.isEnabled()) {
|
||||
getLogger().severe("[CompatNoCheatPlus] The NoCheatPlus plugin already is enabled, this might break several hooks.");
|
||||
}
|
||||
|
||||
// Finished.
|
||||
getLogger().info(getDescription().getFullName() + " is enabled. Some hooks might get registered with NoCheatPlus later on.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user