Module-BukkitTelnet/src/main/java/dev/plex/BukkitTelnetModule.java

44 lines
1.2 KiB
Java
Raw Normal View History

2022-03-31 06:35:22 +00:00
package dev.plex;
import dev.plex.listener.BukkitTelnetListener;
import dev.plex.module.PlexModule;
import lombok.Getter;
2022-04-11 05:01:34 +00:00
import me.totalfreedom.bukkittelnet.BukkitTelnet;
2022-03-31 06:35:22 +00:00
import org.bukkit.Bukkit;
2022-03-31 07:06:34 +00:00
public class BukkitTelnetModule extends PlexModule
{
2022-03-31 06:35:22 +00:00
@Getter
private static BukkitTelnetModule module;
2022-04-11 05:01:34 +00:00
private BukkitTelnet bukkitTelnet;
2022-03-31 06:35:22 +00:00
@Override
2022-03-31 07:06:34 +00:00
public void load()
{
2022-03-31 06:35:22 +00:00
module = this;
}
@Override
2022-03-31 07:06:34 +00:00
public void enable()
{
/*if (getPlex().getSystem().equalsIgnoreCase("permissions") && !Bukkit.getPluginManager().isPluginEnabled("Vault"))
2022-03-31 07:06:34 +00:00
{
2022-03-31 06:35:22 +00:00
throw new RuntimeException("Plex-BukkitTelnet requires the 'Vault' plugin as well as a Permissions plugin that hooks into 'Vault.' We recommend LuckPerms!");
}*/
2022-03-31 06:35:22 +00:00
2022-04-14 22:20:38 +00:00
if (!Bukkit.getPluginManager().isPluginEnabled("BukkitTelnet"))
{
throw new RuntimeException("The Plex-BukkitTelnet module requires the BukkitTelnet plugin to work. Please download it from: https://github.com/plexusorg/BukkitTelnet/releases");
}
2022-03-31 06:35:22 +00:00
this.registerListener(new BukkitTelnetListener());
2022-04-11 05:01:34 +00:00
this.bukkitTelnet = BukkitTelnet.getPlugin();
2022-03-31 06:35:22 +00:00
}
@Override
2022-03-31 07:06:34 +00:00
public void disable()
{
2022-03-31 06:35:22 +00:00
}
}