Class RedLib

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
redempt.redlib.RedLib
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class RedLib extends org.bukkit.plugin.java.JavaPlugin
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The middle number of the server version - for example, if the server version is 1.15.2, this will be 15
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.plugin.Plugin
    Gets the plugin that called the calling method of this method
    static <T> List<Class<? extends T>>
    getExtendingClasses(org.bukkit.plugin.Plugin plugin, Class<T> clazz)
    Gets all non-abstract, non-interface classes which extend a certain class within a plugin
    static org.bukkit.plugin.Plugin
     
    static String
     
    static String
    msg(String msg)
     
    void
     
    void
     

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onDisable, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MID_VERSION

      public static final int MID_VERSION
      The middle number of the server version - for example, if the server version is 1.15.2, this will be 15
  • Constructor Details

    • RedLib

      public RedLib()
  • Method Details

    • msg

      public static String msg(String msg)
    • getInstance

      public static org.bukkit.plugin.Plugin getInstance()
      Returns:
      An instance of RedLib if it is a plugin dependency, or your plugin if RedLib is shaded
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • getServerVersion

      public static String getServerVersion()
      Returns:
      The server version String (ex: 1.16.4)
    • getCallingPlugin

      public static org.bukkit.plugin.Plugin getCallingPlugin()
      Gets the plugin that called the calling method of this method
      Returns:
      The plugin which called the method
    • getExtendingClasses

      public static <T> List<Class<? extends T>> getExtendingClasses(org.bukkit.plugin.Plugin plugin, Class<T> clazz)
      Gets all non-abstract, non-interface classes which extend a certain class within a plugin
      Type Parameters:
      T - The type of the class
      Parameters:
      plugin - The plugin
      clazz - The class
      Returns:
      The list of matching classes