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
FieldsModifier and TypeFieldDescriptionstatic final intThe middle number of the server version - for example, if the server version is 1.15.2, this will be 15 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.plugin.PluginGets 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.Pluginstatic Stringstatic StringvoidonEnable()voidonLoad()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, toStringMethods 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:
onLoadin interfaceorg.bukkit.plugin.Plugin- Overrides:
onLoadin classorg.bukkit.plugin.java.JavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein 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
-