Class RexlCloudHelper
java.lang.Object
de.rexlcloud.bridge.helper.RexlCloudHelper
Converts between Bukkit
Locations and the cloud's ServerLocation (the world is stored by its
name).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerLocationlocationToServerLocation(@Nullable org.bukkit.World world, org.bukkit.Location location) static ServerLocationlocationToServerLocation(@Nullable org.bukkit.World world, org.bukkit.Location location, boolean withRotation) static ServerLocationlocationToServerLocation(org.bukkit.Location location) static ServerLocationlocationToServerLocation(org.bukkit.Location location, boolean withRotation) static org.bukkit.LocationserverLocationToLocation(ServerLocation serverLocation) static org.bukkit.LocationserverLocationToLocation(@Nullable org.bukkit.World world, ServerLocation serverLocation)
-
Constructor Details
-
RexlCloudHelper
public RexlCloudHelper()
-
-
Method Details
-
locationToServerLocation
- Returns:
- the location with its world and viewing direction
-
locationToServerLocation
public static ServerLocation locationToServerLocation(org.bukkit.Location location, boolean withRotation) - Parameters:
withRotation- whether the viewing direction is kept- Returns:
- the location with its world
-
locationToServerLocation
public static ServerLocation locationToServerLocation(@Nullable @Nullable org.bukkit.World world, org.bukkit.Location location) - Parameters:
world- the world to store instead of the location's,nullfor none- Returns:
- the location with the viewing direction
-
locationToServerLocation
public static ServerLocation locationToServerLocation(@Nullable @Nullable org.bukkit.World world, org.bukkit.Location location, boolean withRotation) - Parameters:
world- the world to store instead of the location's,nullfor nonewithRotation- whether the viewing direction is kept- Returns:
- the location
-
serverLocationToLocation
- Returns:
- the Bukkit location in the location's world; without a world name the world is
null
-
serverLocationToLocation
public static org.bukkit.Location serverLocationToLocation(@Nullable @Nullable org.bukkit.World world, ServerLocation serverLocation) - Parameters:
world- used if the location has no world name or its world is not loaded- Returns:
- the Bukkit location
-