Class PlayerPlaceConstructionEvent

All Implemented Interfaces:
Cancellable

public final class PlayerPlaceConstructionEvent extends PlayerConstructionEvent
Called when a player places a construction element.
  • Method Details

    • setTypeID

      public void setTypeID(byte id)
      Sets the type ID of the construction element.
      Parameters:
      id - the new type ID.
    • setTextureID

      public void setTextureID(int texture)
      Sets the texture of the construction element.
      Parameters:
      texture - the new texture ID. If this is a "poster" construction element, the texture ID is the custom image ID.
    • setPosition

      public void setPosition(Vector3f position)
      Changes the world position of the construction element.
      Parameters:
      position - the new world position of the construction element.
    • setPosition

      public void setPosition(float x, float y, float z)
      Changes the world position of the construction element.
      Parameters:
      x - the new world x position of the construction element.
      y - the new world y position of the construction element.
      z - the new world z position of the construction element.
    • setRotation

      public void setRotation(Quaternion rotation)
      Changes the rotation of the construction element.
      Parameters:
      rotation - the new construction element rotation. Set to null to reset the rotation (Quaternion.IDENTITY).
    • setRotation

      public void setRotation(float pitch, float yaw, float roll)
      Changes the rotation of the construction element.
      Parameters:
      pitch - the new x angle, as euler rotation (pitch).
      yaw - the new y angle, as euler rotation (yaw).
      roll - the new z angle, as euler rotation (roll).
    • setSize

      public void setSize(Vector3f size)
      Changes the size of the construction element.
      Parameters:
      size - the new size (x, y, z, as a Vector3f) of the construction element.
    • setSize

      public void setSize(float x, float y, float z)
      Changes the size of the construction element.
      Parameters:
      x - the new size of the construction element along the x axis.
      y - the new size of the construction element along the y axis.
      z - the new size of the construction element along the z axis.
    • setColor

      public void setColor(int color)
    • getMultiPlaceRowX

      public int getMultiPlaceRowX()
      Gets the amount of additional elements the player wants to place in a row (multi-placement) along the x axis. By default this is 0.
      Returns:
      the amount of elements the player wants to place in a row along x.
    • getMultiPlaceRowY

      public int getMultiPlaceRowY()
      Gets the amount of additional elements the player wants to place in a row (multi-placement) along the y axis. By default this is 0.
      Returns:
      the amount of elements the player wants to place in a row along y.
    • getMultiPlaceRowZ

      public int getMultiPlaceRowZ()
      Gets the amount of additional elements the player wants to place in a row (multi-placement) along the z axis. By default this is 0.
      Returns:
      the amount of elements the player wants to place in a row along z.