Class LTSleepNStormAPI


  • public final class LTSleepNStormAPI
    extends java.lang.Object
    The API class.
    Author:
    leothawne
    • Constructor Summary

      Constructors 
      Constructor Description
      LTSleepNStormAPI​(LTSleepNStorm plugin, io.github.leothawne.LTSleepNStorm.module.ConsoleModule console, org.bukkit.configuration.file.FileConfiguration configuration, org.bukkit.configuration.file.FileConfiguration language, io.github.leothawne.LTSleepNStorm.api.MetricsAPI metrics, org.bukkit.scheduler.BukkitScheduler scheduler, int adTask)
      Deprecated.
      There is no need to manually create an object with this constructor when you can easily use LTSleepNStorm.getAPI().
    • Method Summary

      Modifier and Type Method Description
      boolean cancelAdTask()
      Deprecated.
      For development mode only.
      void forceSleep​(java.lang.String playerName)
      Forces the player to sleep.
      void forceSleep​(java.lang.String playerName, boolean ignoreNearbyMonsters)
      Forces the player to sleep.
      void forceSleep​(java.util.UUID playerUUID)
      Forces the player to sleep.
      void forceSleep​(java.util.UUID playerUUID, boolean ignoreNearbyMonsters)
      Forces the player to sleep.
      void forceSleep​(org.bukkit.entity.Player player)
      Forces the player to sleep.
      void forceSleep​(org.bukkit.entity.Player player, boolean ignoreNearbyMonsters)
      Forces the player to sleep.
      org.bukkit.configuration.file.FileConfiguration getConfigurationMap()
      Returns a FileConfiguration type value that can be used to access all configuration variables been used by the plugin.
      io.github.leothawne.LTSleepNStorm.module.ConsoleModule getConsoleSender()
      Returns a ConsoleLoader type value that can be used to log messages on the server console.
      int getDefaultAFKLevel()
      Returns the default AFK level defined in config.yml.
      org.bukkit.configuration.file.FileConfiguration getLanguageMap()
      Returns a FileConfiguration type value that can be used to access all language variables been used by the plugin.
      boolean isMetricsEnabled()
      Returns a boolean type value that can be used to determine if the plugin is currently using bStats.
      boolean isPlayerSafe​(org.bukkit.Location location)
      Returns a boolean type value that can be used to determine if a player is away from hostile mobs.
      io.github.leothawne.LTSleepNStorm.api.SpigotAPI spigot()
      Deprecated.
      Work in progress.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LTSleepNStormAPI

        public LTSleepNStormAPI​(LTSleepNStorm plugin,
                                io.github.leothawne.LTSleepNStorm.module.ConsoleModule console,
                                org.bukkit.configuration.file.FileConfiguration configuration,
                                org.bukkit.configuration.file.FileConfiguration language,
                                io.github.leothawne.LTSleepNStorm.api.MetricsAPI metrics,
                                org.bukkit.scheduler.BukkitScheduler scheduler,
                                int adTask)
        Deprecated.
        There is no need to manually create an object with this constructor when you can easily use LTSleepNStorm.getAPI().
    • Method Detail

      • isPlayerSafe

        public final boolean isPlayerSafe​(org.bukkit.Location location)
        Returns a boolean type value that can be used to determine if a player is away from hostile mobs.
        Parameters:
        location - A Location type variable.
        Returns:
        A boolean type value.
      • getConsoleSender

        public final io.github.leothawne.LTSleepNStorm.module.ConsoleModule getConsoleSender()
        Returns a ConsoleLoader type value that can be used to log messages on the server console.
        Returns:
        A ConsoleLoader type value.
      • getDefaultAFKLevel

        public final int getDefaultAFKLevel()
        Returns the default AFK level defined in config.yml.
        Returns:
        An Integer type value.
      • isMetricsEnabled

        public final boolean isMetricsEnabled()
        Returns a boolean type value that can be used to determine if the plugin is currently using bStats.
        Returns:
        A boolean type value.
      • getConfigurationMap

        public final org.bukkit.configuration.file.FileConfiguration getConfigurationMap()
        Returns a FileConfiguration type value that can be used to access all configuration variables been used by the plugin.
        Returns:
        A FileConfiguration type value.
      • getLanguageMap

        public final org.bukkit.configuration.file.FileConfiguration getLanguageMap()
        Returns a FileConfiguration type value that can be used to access all language variables been used by the plugin.
        Returns:
        A FileConfiguration type value.
      • forceSleep

        public final void forceSleep​(org.bukkit.entity.Player player)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        player - The Player type variable.
      • forceSleep

        public final void forceSleep​(java.util.UUID playerUUID)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        playerUUID - The player's unique id.
      • forceSleep

        public final void forceSleep​(java.lang.String playerName)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        playerName - The player's name.
      • forceSleep

        public final void forceSleep​(org.bukkit.entity.Player player,
                                     boolean ignoreNearbyMonsters)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        player - The Player type variable.
        ignoreNearbyMonsters - "true" if you want to make the player sleep even with monsters nearby. Default: false.
      • forceSleep

        public final void forceSleep​(java.util.UUID playerUUID,
                                     boolean ignoreNearbyMonsters)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        playerUUID - The player's unique id.
        ignoreNearbyMonsters - "true" if you want to make the player sleep even with monsters nearby. Default: false.
      • forceSleep

        public final void forceSleep​(java.lang.String playerName,
                                     boolean ignoreNearbyMonsters)
        Forces the player to sleep. Permission nodes not required.
        Parameters:
        playerName - The player's name.
        ignoreNearbyMonsters - "true" if you want to make the player sleep even with monsters nearby. Default: false.
      • cancelAdTask

        public final boolean cancelAdTask()
        Deprecated.
        For development mode only.
      • spigot

        public final io.github.leothawne.LTSleepNStorm.api.SpigotAPI spigot()
        Deprecated.
        Work in progress.