Package dev.chicoferreira.lifestealer
Class Lifestealer
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
dev.chicoferreira.lifestealer.Lifestealer
- All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner
,org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public class Lifestealer
extends org.bukkit.plugin.java.JavaPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the executor instance.Returns the heart drop restriction manager instance.Returns the import/export storage instance.Returns the item manager instance.Returns the user controller instance.Returns the user manager instance.Returns the user persistent storage instance.Returns the user rules controller instance.void
void
onEnable()
void
onLoad()
void
Reloads the configuration and updates the plugin's settings.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, 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
Methods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getLog4JLogger, getSLF4JLogger
-
Constructor Details
-
Lifestealer
public Lifestealer()
-
-
Method Details
-
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
-
reloadConfiguration
public void reloadConfiguration() throws org.spongepowered.configurate.serialize.SerializationExceptionReloads the configuration and updates the plugin's settings.Thread-safety: This method is thread-safe.
- Throws:
org.spongepowered.configurate.serialize.SerializationException
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
getUserManager
Returns the user manager instance. You can use this to get aLifestealerUser
instance of a player.- Returns:
- the user manager
-
getUserController
Returns the user controller instance. You can use this for many plugin logic things, such as setting the amount of hearts of a player.- Returns:
- the controller instance
-
getItemManager
Returns the item manager instance. You can use this to get the item stack to drop when a player dies or register new item types.- Returns:
- the item manager instance
-
getUserRulesController
Returns the user rules controller instance. You can use this to get the user rules of the plugin. The rules can be used to get the minimum and maximum amount of hearts a player can have, or their ban time.- Returns:
- the user rules controller instance
-
getHeartDropRestrictionManager
Returns the heart drop restriction manager instance. You can use this to compute if a player should drop their hearts when they die.- Returns:
- the heart drop restriction manager instance
-
getExecutor
Returns the executor instance. You can use this to run tasks in the main or async thread.- Returns:
- the executor instance
-
getUserPersistentStorage
Returns the user persistent storage instance. You can use this to save and load users from the database.- Returns:
- the user persistent storage instance
-
getImportExportStorage
Returns the import/export storage instance. You can use this to import and export users from the database.- Returns:
- the import/export storage instance
-