This was a PITA

This commit is contained in:
Video
2023-08-25 13:23:06 -06:00
parent d5b4da89ab
commit 83a76e380d
9 changed files with 105 additions and 66 deletions

View File

@ -0,0 +1,25 @@
package me.videogamesm12.nickmm;
import com.earth2me.essentials.Essentials;
import dev.plex.module.PlexModule;
import me.videogamesm12.nickmm.command.NickMMCommand;
import org.bukkit.Bukkit;
public class NickMiniMessageModule extends PlexModule
{
@Override
public void enable()
{
if (!Bukkit.getPluginManager().isPluginEnabled("Essentials"))
{
throw new IllegalStateException("We need Essentials for this module to work!");
}
registerCommand(new NickMMCommand());
}
public static Essentials getEssentials()
{
return (Essentials) Bukkit.getPluginManager().getPlugin("Essentials");
}
}