Class RexlCloudHelper

java.lang.Object
de.rexlcloud.bridge.helper.RexlCloudHelper

public class RexlCloudHelper extends Object
Converts between Bukkit Locations and the cloud's ServerLocation (the world is stored by its name).
  • Constructor Details

    • RexlCloudHelper

      public RexlCloudHelper()
  • Method Details

    • locationToServerLocation

      public static ServerLocation locationToServerLocation(org.bukkit.Location location)
      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, null for 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, null for none
      withRotation - whether the viewing direction is kept
      Returns:
      the location
    • serverLocationToLocation

      public static org.bukkit.Location serverLocationToLocation(ServerLocation serverLocation)
      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