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 ( )
{
2022-04-11 05:01:34 +00:00
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! " ) ;
}
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
}
}