Check if mypet is enabled

This commit is contained in:
Len 2025-07-07 16:18:48 +02:00
parent 53569f0951
commit 054f39407d

View File

@ -57,7 +57,7 @@ public class AFKDetector extends JavaPlugin implements Listener {
getCommand("afkcheck").setExecutor(new AFKCheckCommand(this));
getCommand("reloadafkdetector").setExecutor(new ReloadCommand(this));
new AFKCheckTimer(this).init();
myPetEnabled = getServer().getPluginManager().getPlugin("MyPet") != null;
myPetEnabled = getServer().getPluginManager().isPluginEnabled("MyPet");
} catch (Throwable t) {
getLogger().severe("An error has occured while loading AFKDetector");
if (!(t instanceof ExceptionInInitializerError)) {