API?
Rocologo opened this issue ยท 1 comments
Hi, I'm the dev of MobHunting and one of my users ask asked me if I can integrate to your plugin.
The only thing I would need is an API() with a method called
boolean isEnabled(World uuid)
I would love if your could make that for me, so integration will be fast an easy?
I found a solution without an API
public static boolean isEnabledForWorld(World world) {
if (isSupported()) {
for (String worldName : ((ExtraHardMode) mPlugin).getModuleForClass(RootConfig.class).getEnabledWorlds())
if (worldName.equalsIgnoreCase("@ALL") || world.getName().equalsIgnoreCase(worldName)) {
Messages.debug("This world(%s) has ExtraHardMode enabled", worldName);
return true;
}
}
return false;
}