Class ImmutableXYZ

java.lang.Object
de.marcely.bedwars.tools.location.XYZ
de.marcely.bedwars.tools.location.ImmutableXYZ
All Implemented Interfaces:
Cloneable, ConfigurationSerializable

public class ImmutableXYZ extends XYZ
Extends XYZ and forbids any modifications done to it
  • Constructor Details

    • ImmutableXYZ

      public ImmutableXYZ()
    • ImmutableXYZ

      public ImmutableXYZ(Location loc)
    • ImmutableXYZ

      public ImmutableXYZ(Vector vec)
    • ImmutableXYZ

      public ImmutableXYZ(XYZ xyz)
    • ImmutableXYZ

      public ImmutableXYZ(double x, double y, double z)
  • Method Details

    • setX

      public XYZ setX(double x)
      Description copied from class: XYZ
      Sets the x-coordinate
      Overrides:
      setX in class XYZ
      Parameters:
      x - The new x-coordinate
      Returns:
      This XYZ instance
    • setY

      public XYZ setY(double y)
      Description copied from class: XYZ
      Sets the y-coordinate
      Overrides:
      setY in class XYZ
      Parameters:
      y - The new y-coordinate
      Returns:
      This XYZ instance
    • setZ

      public XYZ setZ(double z)
      Description copied from class: XYZ
      Sets the z-coordinate
      Overrides:
      setZ in class XYZ
      Parameters:
      z - The new z-coordinate
      Returns:
      This XYZ instance
    • set

      public XYZ set(double x, double y, double z)
      Description copied from class: XYZ
      Sets the new coordinates
      Overrides:
      set in class XYZ
      Parameters:
      x - The new x-coordinate
      y - The new y-coordinate
      z - The new z-coordinate
      Returns:
      This XYZ instance
    • set

      public XYZ set(XYZ xyz)
      Description copied from class: XYZ
      Copies and sets the xyz coordinates from the given object
      Overrides:
      set in class XYZ
      Parameters:
      xyz - The object from which it shall be taken from
      Returns:
      This XYZ instance
    • set

      public XYZ set(Location loc)
      Description copied from class: XYZ
      Copies and sets the xyz coordinates from the given object
      Overrides:
      set in class XYZ
      Parameters:
      loc - The object from which it shall be taken from
      Returns:
      This XYZ instance
    • add

      public XYZ add(double x, double y, double z)
      Description copied from class: XYZ
      Adds the x-coordinates
      Overrides:
      add in class XYZ
      Parameters:
      x - The new x-coordinate
      y - The new y-coordinate
      z - The new z-coordinate
      Returns:
      This XYZ instance
    • add

      public XYZ add(XYZ xyz)
      Overrides:
      add in class XYZ
    • add

      public XYZ add(Location loc)
      Overrides:
      add in class XYZ
    • add

      public XYZ add(Vector vec)
      Overrides:
      add in class XYZ
    • subtract

      public XYZ subtract(double x, double y, double z)
      Overrides:
      subtract in class XYZ
    • subtract

      public XYZ subtract(XYZ xyz)
      Overrides:
      subtract in class XYZ
    • subtract

      public XYZ subtract(Location loc)
      Overrides:
      subtract in class XYZ
    • subtract

      public XYZ subtract(Vector vec)
      Overrides:
      subtract in class XYZ
    • multiply

      public XYZ multiply(double amount)
      Overrides:
      multiply in class XYZ
    • multiply

      public XYZ multiply(double x, double y, double z)
      Overrides:
      multiply in class XYZ
    • zero

      public XYZ zero()
      Description copied from class: XYZ
      Sets all coordinates to 0
      Overrides:
      zero in class XYZ
      Returns:
      This XYZ instance