Class HuskHomesAPI

java.lang.Object
net.william278.huskhomes.api.BaseHuskHomesAPI
net.william278.huskhomes.api.HuskHomesAPI

public class HuskHomesAPI extends net.william278.huskhomes.api.BaseHuskHomesAPI
The HuskHomes API implementation for the Bukkit platform, providing methods to access player data, homes, warps and process teleports

Retrieve an instance of the API class via getInstance().

  • Field Summary

    Fields inherited from class net.william278.huskhomes.api.BaseHuskHomesAPI

    plugin
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.william278.huskhomes.position.Location
    adaptLocation​(org.bukkit.Location location)
    Returns a Location instance for the given bukkit Location.
    @Nullable net.william278.huskhomes.position.Position
    adaptPosition​(org.bukkit.Location location, @NotNull net.william278.huskhomes.position.Server server)
    Returns a Position instance for the given bukkit Location on the given Server.
    @NotNull net.william278.huskhomes.player.OnlineUser
    adaptUser​(@NotNull org.bukkit.entity.Player player)
    Returns an OnlineUser instance for the given bukkit Player.
    Entrypoint to the HuskHomes API - returns an instance of the API
    org.bukkit.Location
    getLocation​(@NotNull net.william278.huskhomes.position.Position position)
    Returns the bukkit Location being represented by the given Position.
    @NotNull org.bukkit.entity.Player
    getPlayer​(@NotNull net.william278.huskhomes.player.OnlineUser user)
    Returns the bukkit Player being represented by the given OnlineUser.
    @NotNull net.william278.huskhomes.position.Server
    Get the Server, containing the ID of the server the plugin is running on

    Methods inherited from class net.william278.huskhomes.api.BaseHuskHomesAPI

    getFreeHomeSlots, getHome, getHome, getLocale, getMaxHomeSlots, getMaxPublicHomeSlots, getPublicHomes, getRawLocale, getSpawn, getUserData, getUserData, getUserHomes, getUserLastPosition, getUserOfflinePosition, getUserPublicHomes, getUserRespawnPosition, getWarp, getWarp, getWarps, isUserWarmingUp, randomlyTeleportPlayer, randomlyTeleportPlayer, saveUserData, setRandomTeleportEngine, teleportBuilder, teleportPlayer, teleportPlayer, updateHomeMeta, updateHomePosition, updateHomePrivacy, updateWarpMeta, updateWarpPosition

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static HuskHomesAPI getInstance()
      Entrypoint to the HuskHomes API - returns an instance of the API
      Returns:
      instance of the HuskHomes API
    • adaptUser

      @NotNull public @NotNull net.william278.huskhomes.player.OnlineUser adaptUser(@NotNull @NotNull org.bukkit.entity.Player player)
      Returns an OnlineUser instance for the given bukkit Player.
      Parameters:
      player - the bukkit player to get the User instance for
      Returns:
      the OnlineUser instance for the given bukkit Player
      Since:
      3.0
    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer(@NotNull @NotNull net.william278.huskhomes.player.OnlineUser user)
      Returns the bukkit Player being represented by the given OnlineUser.
      Parameters:
      user - OnlineUser to get the bukkit player from
      Returns:
      the bukkit Player being represented by the given OnlineUser
      Since:
      3.0
    • getLocation

      @Nullable public org.bukkit.Location getLocation(@NotNull @NotNull net.william278.huskhomes.position.Position position)
      Returns the bukkit Location being represented by the given Position.
      Parameters:
      position - the Position to get the bukkit location from
      Returns:
      the bukkit Location being represented by the given Position
      Since:
      3.0
    • adaptLocation

      @Nullable public @Nullable net.william278.huskhomes.position.Location adaptLocation(@NotNull org.bukkit.Location location)
      Returns a Location instance for the given bukkit Location.
      Parameters:
      location - the bukkit location to get the Location instance for
      Returns:
      the Location instance for the given bukkit Location
      Since:
      3.0
    • adaptPosition

      @Nullable public @Nullable net.william278.huskhomes.position.Position adaptPosition(@NotNull org.bukkit.Location location, @NotNull @NotNull net.william278.huskhomes.position.Server server)
      Returns a Position instance for the given bukkit Location on the given Server.
      Parameters:
      location - the bukkit location to get the Position instance for
      server - the Server the position is on
      Returns:
      the Position instance for the given bukkit Location on the given Server
      Since:
      3.0
      See Also:
      Position.server
    • getServer

      @NotNull public @NotNull net.william278.huskhomes.position.Server getServer()
      Get the Server, containing the ID of the server the plugin is running on
      Returns:
      the Server
      Since:
      3.0