All Implemented Interfaces:
Cloneable

public class Wheel extends EquipablePart
The Wheel part, placed on the vehicle.

Note: The item of the wheel is based on the RimDesign.

  • Constructor Details

    • Wheel

      public Wheel()
      Construct a new default Wheel part.
    • Wheel

      public Wheel(double xOffset, double yOffset, double zOffset, @NotNull @NotNull RimDesign rimDesign, @NotNull @NotNull org.bukkit.Color color)
      Construct a new Wheel part.
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      rimDesign - The rim design
      color - The color of the wheel
    • Wheel

      public Wheel(double xOffset, double yOffset, double zOffset, @NotNull @NotNull RimDesign rimDesign, @NotNull @NotNull org.bukkit.Color color, boolean steering, int rotationOffset)
      Construct a new Wheel part.
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      rimDesign - The rim design
      color - The color of the wheel
      steering - Is this wheel moving to left/right?
      rotationOffset - The rotation offset
  • Method Details

    • asString

      public String asString()
      Description copied from class: Part
      Get the part as string, for the info command.
      Specified by:
      asString in class Part
      Returns:
      The part as string.
    • applyExtraOffset

      public org.bukkit.Location applyExtraOffset(org.bukkit.Location loc)
      Description copied from class: Part
      Override this method to apply extra offset.
      Overrides:
      applyExtraOffset in class Part
      Parameters:
      loc - The input location.
      Returns:
      The output location, with the extra offset applied.
    • setRimDesignId

      public void setRimDesignId(String rimDesignId)
      Change the rim design of this wheel. This will also update the holder if spawned.
      Parameters:
      rimDesignId - The rim design id
    • getItem

      public org.bukkit.inventory.ItemStack getItem()
      Overrides the item getter to ignore it for JSON serialization. This is because the item is already stored in the RimDesign.
      Overrides:
      getItem in class EquipablePart
    • getPosition

      public HolderItemPosition getPosition()
      Overrides the position getter to ignore it for JSON serialization. This is because the position is already stored in the RimDesign.
      Overrides:
      getPosition in class EquipablePart
    • getPartGUIItem

      public org.bukkit.inventory.ItemStack getPartGUIItem()
      Description copied from class: Part
      The Configuration and Addon GUI will call this method to get the item to display.
      Specified by:
      getPartGUIItem in class Part
      Returns:
      The item to display.
    • despawnStand

      public void despawnStand()
      Despawn the stand of this wheel.
      Overrides:
      despawnStand in class Part
    • getRimDesignId

      public String getRimDesignId()
      The rimdesign of the wheel.
    • isSteering

      public boolean isSteering()
      Is this wheel moving to left/right?
    • getSteeringOffset

      public float getSteeringOffset()
      The steering rotation offset.
    • setSteering

      public void setSteering(boolean steering)
      Is this wheel moving to left/right?
    • setSteeringOffset

      public void setSteeringOffset(float steeringOffset)
      The steering rotation offset.