Klasse PlayerPlaceObjectEvent

Alle implementierten Schnittstellen:
Cancellable

public final class PlayerPlaceObjectEvent extends PlayerObjectEvent
Called when a player places an objects (furniture, doors, lamps, chests etc).
  • Methodendetails

    • getPosition

      public Vector3f getPosition()
      Gets the world position of the object as a Vector3f.
      Gibt zurück:
      the global object position as a Vector3f.
    • getRotation

      public Quaternion getRotation()
      Gets the rotation of the object as a Quaternion.
      Gibt zurück:
      the object rotation as a Quaternion.
    • getScale

      public Vector3f getScale()
      Gets the scale factor of the object along the x, y and z axis. By default, it's 1 1 1.
      Gibt zurück:
      the object scale factor, as a Vector3f.
    • getColor

      public int getColor()
    • getStatus

      public byte getStatus()
      Gets the current status of the object. The status is only used by some objects, e.g. doors (usually status 0 == closed, status 1 == opened), chests (status only represents the visual state, like doors), furnaces etc.
      Gibt zurück:
      the object status.
    • getInfoID

      public long getInfoID()
      Gets the info ID of the object. For regular objects, the info ID is usually -1 (so it's unused), only objects which hold additional information have an info ID (e.g for a chest, the info ID is the global chest ID, for furnaces, it is the global furnace ID etc).
      Gibt zurück:
      the object info ID.
    • setColor

      public void setColor(int rgba)
    • setPosition

      public void setPosition(Vector3f position)
      Changes the object world position.
      Parameter:
      position - the new object world position.
    • setPosition

      public void setPosition(float x, float y, float z)
      Changes the object world position.
      Parameter:
      x - the new object world x position.
      y - the new object world y position.
      z - the new object world z position.
    • setRotation

      public void setRotation(Quaternion rotation)
      Changes the object rotation.
      Parameter:
      rotation - the new object rotation. Set to null to reset the rotation (Quaternion.IDENTITY).