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 Details

    • Lifestealer

      public Lifestealer()
  • Method Details

    • 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
    • reloadConfiguration

      public void reloadConfiguration() throws org.spongepowered.configurate.serialize.SerializationException
      Reloads 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 interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • getUserManager

      public LifestealerUserManager getUserManager()
      Returns the user manager instance. You can use this to get a LifestealerUser instance of a player.
      Returns:
      the user manager
    • getUserController

      public LifestealerUserController 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

      public LifestealerHeartItemManager 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

      public LifestealerUserRulesController 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

      public LifestealerHeartDropRestrictionManager 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

      public LifestealerExecutor getExecutor()
      Returns the executor instance. You can use this to run tasks in the main or async thread.
      Returns:
      the executor instance
    • getUserPersistentStorage

      public UserPersistentStorage 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

      public ImportExportStorage 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