Package xyz.jpenilla.squaremap.api
Class BukkitAdapter
java.lang.Object
xyz.jpenilla.squaremap.api.BukkitAdapter
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public final class BukkitAdapter
extends Object
Helper methods for bridging the Bukkit API with squaremap API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.WorldbukkitWorld(MapWorld world) Gets the BukkitWorldfor the givenMapWorld.static org.bukkit.NamespacedKeynamespacedKey(WorldIdentifier worldIdentifier) Convert the givenWorldIdentifierto a BukkitNamespacedKey.static Pointpoint(org.bukkit.Location location) Create a new point from a BukkitLocation.static WorldIdentifierworldIdentifier(org.bukkit.World world) Gets theWorldIdentifierfor a BukkitWorld.
-
Method Details
-
worldIdentifier
Gets theWorldIdentifierfor a BukkitWorld.- Parameters:
world- Bukkit world- Returns:
- world identifier
-
namespacedKey
Convert the givenWorldIdentifierto a BukkitNamespacedKey.- Parameters:
worldIdentifier- world identifier- Returns:
- namespaced key
-
bukkitWorld
Gets the BukkitWorldfor the givenMapWorld.- Parameters:
world- world identifier- Returns:
- bukkit world
-
point
Create a new point from a BukkitLocation. Uses block location.- Parameters:
location- location- Returns:
- point
-