Class SpawnLocation

  • All Implemented Interfaces:
    java.lang.Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable
    Direct Known Subclasses:
    MVWorld.NullLocation

    public class SpawnLocation
    extends org.bukkit.Location
    implements org.bukkit.configuration.serialization.ConfigurationSerializable
    Just like a regular Location, however world is usually null or just a weak reference and it implements ConfigurationSerializable.
    • Constructor Summary

      Constructors 
      Constructor Description
      SpawnLocation​(double x, double y, double z)  
      SpawnLocation​(double x, double y, double z, float yaw, float pitch)  
      SpawnLocation​(org.bukkit.Location loc)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SpawnLocation deserialize​(java.util.Map<java.lang.String,​java.lang.Object> args)
      Let Bukkit be able to deserialize this.
      org.bukkit.block.Block getBlock()
      org.bukkit.Chunk getChunk()
      org.bukkit.World getWorld()
      java.util.Map<java.lang.String,​java.lang.Object> serialize()
      void setWorld​(org.bukkit.World world)
      • Methods inherited from class org.bukkit.Location

        add, add, add, checkFinite, clone, distance, distanceSquared, equals, getBlockX, getBlockY, getBlockZ, getDirection, getPitch, getX, getY, getYaw, getZ, hashCode, length, lengthSquared, locToBlock, multiply, normalizePitch, normalizeYaw, setDirection, setPitch, setX, setY, setYaw, setZ, subtract, subtract, subtract, toString, toVector, zero
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SpawnLocation

        public SpawnLocation​(double x,
                             double y,
                             double z)
      • SpawnLocation

        public SpawnLocation​(double x,
                             double y,
                             double z,
                             float yaw,
                             float pitch)
      • SpawnLocation

        public SpawnLocation​(org.bukkit.Location loc)
    • Method Detail

      • getWorld

        public org.bukkit.World getWorld()
        Overrides:
        getWorld in class org.bukkit.Location
      • setWorld

        public void setWorld​(org.bukkit.World world)
        Overrides:
        setWorld in class org.bukkit.Location
      • getChunk

        public org.bukkit.Chunk getChunk()
        Overrides:
        getChunk in class org.bukkit.Location
      • getBlock

        public org.bukkit.block.Block getBlock()
        Overrides:
        getBlock in class org.bukkit.Location
      • serialize

        public java.util.Map<java.lang.String,​java.lang.Object> serialize()
        Specified by:
        serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
        Overrides:
        serialize in class org.bukkit.Location
      • deserialize

        public static SpawnLocation deserialize​(java.util.Map<java.lang.String,​java.lang.Object> args)
        Let Bukkit be able to deserialize this.
        Parameters:
        args - The map.
        Returns:
        The deserialized object.