Package redempt.redlib
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
Modifier and TypeFieldDescriptionstatic 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.plugin.Plugin
Gets the plugin that called the calling method of this methodgetExtendingClasses
(org.bukkit.plugin.Plugin plugin, Class<T> clazz) Gets all non-abstract, non-interface classes which extend a certain class within a pluginstatic org.bukkit.plugin.Plugin
static String
static String
void
onEnable()
void
onLoad()
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
-
Field Details
-
MID_VERSION
public static final int MID_VERSIONThe 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
-
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 interfaceorg.bukkit.plugin.Plugin
- Overrides:
onLoad
in classorg.bukkit.plugin.java.JavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
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 pluginclazz
- The class- Returns:
- The list of matching classes
-