Package net.william278.huskhomes.api
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 TypeMethodDescription@Nullable net.william278.huskhomes.position.Location
adaptLocation(org.bukkit.Location location)
Returns aLocation
instance for the given bukkitLocation
.@Nullable net.william278.huskhomes.position.Position
adaptPosition(org.bukkit.Location location, @NotNull net.william278.huskhomes.position.Server server)
Returns aPosition
instance for the given bukkitLocation
on the givenServer
.@NotNull net.william278.huskhomes.player.OnlineUser
adaptUser(@NotNull org.bukkit.entity.Player player)
Returns anOnlineUser
instance for the given bukkitPlayer
.static HuskHomesAPI
Entrypoint to the HuskHomes API - returns an instance of the APIorg.bukkit.Location
getLocation(@NotNull net.william278.huskhomes.position.Position position)
Returns the bukkitLocation
being represented by the givenPosition
.@NotNull org.bukkit.entity.Player
getPlayer(@NotNull net.william278.huskhomes.player.OnlineUser user)
Returns the bukkitPlayer
being represented by the givenOnlineUser
.@NotNull net.william278.huskhomes.position.Server
Get theServer
, containing the ID of the server the plugin is running onMethods 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
-
Method Details
-
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 anOnlineUser
instance for the given bukkitPlayer
.- Parameters:
player
- the bukkit player to get theUser
instance for- Returns:
- the
OnlineUser
instance for the given bukkitPlayer
- Since:
- 3.0
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer(@NotNull @NotNull net.william278.huskhomes.player.OnlineUser user)Returns the bukkitPlayer
being represented by the givenOnlineUser
.- Parameters:
user
-OnlineUser
to get the bukkit player from- Returns:
- the bukkit
Player
being represented by the givenOnlineUser
- Since:
- 3.0
-
getLocation
@Nullable public org.bukkit.Location getLocation(@NotNull @NotNull net.william278.huskhomes.position.Position position)Returns the bukkitLocation
being represented by the givenPosition
.- Parameters:
position
- thePosition
to get the bukkit location from- Returns:
- the bukkit
Location
being represented by the givenPosition
- Since:
- 3.0
-
adaptLocation
@Nullable public @Nullable net.william278.huskhomes.position.Location adaptLocation(@NotNull org.bukkit.Location location)Returns aLocation
instance for the given bukkitLocation
.- Parameters:
location
- the bukkit location to get theLocation
instance for- Returns:
- the
Location
instance for the given bukkitLocation
- 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 aPosition
instance for the given bukkitLocation
on the givenServer
.- Parameters:
location
- the bukkit location to get thePosition
instance forserver
- theServer
the position is on- Returns:
- the
Position
instance for the given bukkitLocation
on the givenServer
- Since:
- 3.0
- See Also:
Position.server
-
getServer
@NotNull public @NotNull net.william278.huskhomes.position.Server getServer()Get theServer
, containing the ID of the server the plugin is running on- Returns:
- the
Server
- Since:
- 3.0
-