java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.parts.Part
nl.sbdeveloper.vehiclesplus.api.vehicles.parts.impl.seat.Seat
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
BikeSeat, TurretSeat

public class Seat extends Part
The Seat part, where a player can sit on.
  • Constructor Details

    • Seat

      public Seat()
      Construct a new default seat part
    • Seat

      public Seat(double xOffset, double yOffset, double zOffset, boolean steer)
      Construct a new seat part
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      steer - Is this a steering seat?
    • Seat

      public Seat(double xOffset, double yOffset, double zOffset, boolean steer, @NotNull @NotNull org.bukkit.inventory.ItemStack GUIItem)
      Construct a new seat part
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      steer - Is this a steering seat?
      GUIItem - The item to display in the GUI
    • Seat

      public Seat(double xOffset, double yOffset, double zOffset, int rotationOffset, boolean steer)
      Construct a new seat part
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      rotationOffset - The rotation offset
      steer - Is this a steering seat?
    • Seat

      public Seat(double xOffset, double yOffset, double zOffset, int rotationOffset, boolean steer, @NotNull @NotNull org.bukkit.inventory.ItemStack GUIItem)
      Construct a new seat part
      Parameters:
      xOffset - The x-offset
      yOffset - The y-offset
      zOffset - The z-offset
      rotationOffset - The rotation offset
      steer - Is this a steering seat?
      GUIItem - The item to display in the GUI
  • Method Details

    • enter

      public void enter(org.bukkit.entity.Player p)
      Make a player enter this seat
      Parameters:
      p - The player to add
    • getPassenger

      public Optional<org.bukkit.entity.Player> getPassenger()
      Get the passenger of this seat
      Returns:
      The passenger of this seat
    • 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.
    • 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.
    • despawnStand

      public void despawnStand()
      Description copied from class: Part
      Despawn the stand for this part.
      Overrides:
      despawnStand in class Part
    • isSteer

      public boolean isSteer()
      Is this a steering seat?
    • getGUIItem

      public org.bukkit.inventory.ItemStack getGUIItem()
      The item to display in the GUI
    • isOccupied

      public boolean isOccupied()
      Is this seat occupied?
    • setSteer

      public void setSteer(boolean steer)
      Is this a steering seat?
    • setGUIItem

      public void setGUIItem(org.bukkit.inventory.ItemStack GUIItem)
      The item to display in the GUI
    • setOccupied

      public void setOccupied(boolean occupied)
      Is this seat occupied?