Klasse PlayerPlaceVegetationEvent

Alle implementierten Schnittstellen:
Cancellable
Bekannte direkte Unterklassen:
PlayerCreativePlaceVegetationEvent

public class PlayerPlaceVegetationEvent extends PlayerVegetationEvent
Called when the player places a plant (saplings, seedlings etc).
  • Konstruktordetails

    • PlayerPlaceVegetationEvent

      protected PlayerPlaceVegetationEvent(long pointer)
  • Methodendetails

    • setTypeID

      public void setTypeID(short typeID)
      Sets the type ID of the plant.
      Parameter:
      typeID - the new plant type ID.
    • setPosition

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

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

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

      public void setRotation(float pitch, float yaw, float roll)
      Changes the plant rotation.
      Parameter:
      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).
    • isGrowable

      public boolean isGrowable()
      Gets whether or not this plant can grow.
      Gibt zurück:
      true if this plant can grow (e.g saplings, seedlings etc), false if not.
    • getGrowthTime

      public int getGrowthTime()
      Gets the growth time for this plant in seconds. The growth time determines how long it takes until this plant grows (reaching the next growth stage). Returns 0 if this plant cannot grow.
      Gibt zurück:
      the growth time, in seconds.
    • setGrowthTime

      public void setGrowthTime(int growthTime)
      Sets the growth time (in seconds) for this plant. Only works for plants which are growable (see isGrowable()).
      Parameter:
      growthTime - the new growth duration in seconds.