Class WeaponMechanics

java.lang.Object
me.deecaad.weaponmechanics.WeaponMechanics

public class WeaponMechanics extends Object
  • Field Details

    • debug

      public static me.deecaad.core.utils.Debugger debug
  • Constructor Details

    • WeaponMechanics

      public WeaponMechanics(org.bukkit.plugin.java.JavaPlugin javaPlugin)
  • Method Details

    • getConfig

      public org.bukkit.configuration.Configuration getConfig()
    • getLogger

      public Logger getLogger()
    • getDataFolder

      public File getDataFolder()
    • getClassLoader

      public ClassLoader getClassLoader()
    • getFile

      public File getFile()
    • onLoad

      public void onLoad()
    • onEnable

      public void onEnable()
    • onReload

      public me.deecaad.core.file.TaskChain onReload()
    • onDisable

      public void onDisable()
    • getProjectilesRunnable

      public static ProjectilesRunnable getProjectilesRunnable()
      Returns:
      The BukkitRunnable holding the projectiles being ticked
    • getPlugin

      public static org.bukkit.plugin.Plugin getPlugin()
      Returns:
      the WeaponMechanics plugin instance
    • getInstance

      public static WeaponMechanics getInstance()
    • getEntityWrapper

      public static EntityWrapper getEntityWrapper(org.bukkit.entity.LivingEntity entity)
      This method can't return null because new EntityWrapper is created if not found.
      Parameters:
      entity - the entity wrapper to get
      Returns:
      the entity wrapper
    • getEntityWrapper

      @Nullable public static @Nullable EntityWrapper getEntityWrapper(org.bukkit.entity.LivingEntity entity, boolean noAutoAdd)
      This method will return null if no auto add is set to true and EntityWrapper is not found. If no auto add is false then new EntityWrapper is automatically created if not found and returned by this method.
      Parameters:
      entity - the entity
      noAutoAdd - true means that EntityWrapper wont be automatically added if not found
      Returns:
      the entity wrapper or null if no auto add is true and EntityWrapper was not found
    • getPlayerWrapper

      public static PlayerWrapper getPlayerWrapper(org.bukkit.entity.Player player)
      This method can't return null because new PlayerWrapper is created if not found. Use mainly getEntityWrapper() instead of this unless you especially need something from PlayerWrapper.
      Parameters:
      player - the player wrapper to get
      Returns:
      the player wrapper
    • removeEntityWrapper

      public static void removeEntityWrapper(org.bukkit.entity.LivingEntity entity)
      Removes entity (and player) wrapper and all of its content. Move task is also cancelled.
      Parameters:
      entity - the entity (or player)
    • getConfigurations

      public static me.deecaad.core.file.Configuration getConfigurations()
      This method returns ALL configurations EXCEPT config.yml used by WeaponMechanics.
      Returns:
      the configurations interface
    • getBasicConfigurations

      public static me.deecaad.core.file.Configuration getBasicConfigurations()
      This method returns ONLY config.yml configurations used by WeaponMechanics.
      Returns:
      the configurations interface
    • getMainCommand

      public static me.deecaad.core.commands.MainCommand getMainCommand()
      Returns:
      the main command instance of WeaponMechanics
    • getWeaponHandler

      public static WeaponHandler getWeaponHandler()
      Returns:
      the current weapon handler
    • getDatabase

      @Nullable public static @Nullable me.deecaad.core.database.Database getDatabase()
      Returns:
      the database instance if enabled