mirror of
https://github.com/plexusorg/Module-LibsDisguises.git
synced 2024-10-31 20:09:17 +00:00
Add check to make sure LibsDisguises is actually on the server
This commit is contained in:
parent
7bdffd6c0d
commit
b3fb0f01f3
|
@ -4,14 +4,22 @@ import dev.plex.command.DisguiseToggleCMD;
|
||||||
import dev.plex.command.UndisguiseAllCMD;
|
import dev.plex.command.UndisguiseAllCMD;
|
||||||
import dev.plex.listener.DisguiseListener;
|
import dev.plex.listener.DisguiseListener;
|
||||||
import dev.plex.module.PlexModule;
|
import dev.plex.module.PlexModule;
|
||||||
|
import dev.plex.util.PlexLog;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
public class LibsDisguises extends PlexModule
|
public class LibsDisguises extends PlexModule
|
||||||
{
|
{
|
||||||
public static boolean enabled = true;
|
public static boolean enabled = true;
|
||||||
DisguiseListener disguiseListener;
|
DisguiseListener disguiseListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enable()
|
public void enable()
|
||||||
{
|
{
|
||||||
|
if (!Bukkit.getPluginManager().isPluginEnabled("LibsDisguises"))
|
||||||
|
{
|
||||||
|
PlexLog.error("The Plex-LibsDisguises module requires the LibsDisguises plugin to work.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
registerCommand(new DisguiseToggleCMD());
|
registerCommand(new DisguiseToggleCMD());
|
||||||
registerCommand(new UndisguiseAllCMD());
|
registerCommand(new UndisguiseAllCMD());
|
||||||
registerListener(new DisguiseListener());
|
registerListener(new DisguiseListener());
|
||||||
|
|
Loading…
Reference in a new issue