Class Seat
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
The Seat part, where a player can sit on.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSeat()
Construct a new default seat partSeat
(double xOffset, double yOffset, double zOffset, boolean steer) Construct a new seat partSeat
(double xOffset, double yOffset, double zOffset, boolean steer, @NotNull org.bukkit.inventory.ItemStack GUIItem) Construct a new seat partSeat
(double xOffset, double yOffset, double zOffset, int rotationOffset, boolean steer) Construct a new seat partSeat
(double xOffset, double yOffset, double zOffset, int rotationOffset, boolean steer, @NotNull org.bukkit.inventory.ItemStack GUIItem) Construct a new seat part -
Method Summary
Modifier and TypeMethodDescriptionasString()
Get the part as string, for the info command.void
Despawn the stand for this part.void
enter
(org.bukkit.entity.Player p) Make a player enter this seatorg.bukkit.inventory.ItemStack
The item to display in the GUIorg.bukkit.inventory.ItemStack
The Configuration and Addon GUI will call this method to get the item to display.Optional
<org.bukkit.entity.Player> Get the passenger of this seatboolean
Is this seat occupied?boolean
isSteer()
Is this a steering seat?void
setGUIItem
(org.bukkit.inventory.ItemStack GUIItem) The item to display in the GUIvoid
setOccupied
(boolean occupied) Is this seat occupied?void
setSteer
(boolean steer) Is this a steering seat?Methods inherited from class nl.sbdeveloper.vehiclesplus.api.vehicles.parts.Part
applyExtraOffset, canEqual, clone, equals, getHolder, getOwningVehicle, getRotationOffset, getXOffset, getYOffset, getZOffset, hashCode, isAddon, isSpawned, refresh, setAddon, setRotationOffset, setXOffset, setYOffset, setZOffset, spawnStand, toString
-
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-offsetyOffset
- The y-offsetzOffset
- The z-offsetsteer
- 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-offsetyOffset
- The y-offsetzOffset
- The z-offsetsteer
- 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-offsetyOffset
- The y-offsetzOffset
- The z-offsetrotationOffset
- The rotation offsetsteer
- 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-offsetyOffset
- The y-offsetzOffset
- The z-offsetrotationOffset
- The rotation offsetsteer
- 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
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 classPart
- Returns:
- The item to display.
-
asString
Description copied from class:Part
Get the part as string, for the info command. -
despawnStand
public void despawnStand()Description copied from class:Part
Despawn the stand for this part.- Overrides:
despawnStand
in classPart
-
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?
-