Package dev.demeng.pluginbase.plugin
Class BaseManager
java.lang.Object
dev.demeng.pluginbase.plugin.BaseManager
A manager containing all other managers associated with the library, as well as the
JavaPlugin the library is working with.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ThreadGets the main thread of the server that is using the plugin.static @NotNull org.bukkit.plugin.java.JavaPluginGets a never-null instance of theJavaPluginthe library is currently working with.static voidsetPlugin(org.bukkit.plugin.java.JavaPlugin newPlugin) Sets theJavaPluginthat the library is currently working with.
-
Constructor Details
-
BaseManager
public BaseManager()
-
-
Method Details
-
getPlugin
@NotNull public static @NotNull org.bukkit.plugin.java.JavaPlugin getPlugin()Gets a never-null instance of theJavaPluginthe library is currently working with.- Returns:
- The
JavaPluginthe library is currently working with - Throws:
RuntimeException- If the plugin is not set
-
setPlugin
public static void setPlugin(org.bukkit.plugin.java.JavaPlugin newPlugin) Sets theJavaPluginthat the library is currently working with.- Parameters:
newPlugin- The new instance ofJavaPlugin.
-
getMainThread
Gets the main thread of the server that is using the plugin.- Returns:
- The main thread
-