Class Wheel
java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.parts.Part
nl.sbdeveloper.vehiclesplus.api.vehicles.parts.EquipablePart
nl.sbdeveloper.vehiclesplus.api.vehicles.parts.impl.Wheel
- All Implemented Interfaces:
Cloneable
The Wheel part, placed on the vehicle.
Note: The item of the wheel is based on the RimDesign.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionWheel()Construct a new default Wheel part.Wheel(double xOffset, double yOffset, double zOffset, @NotNull RimDesign rimDesign, @NotNull org.bukkit.Color color) Construct a new Wheel part.Wheel(double xOffset, double yOffset, double zOffset, @NotNull RimDesign rimDesign, @NotNull org.bukkit.Color color, boolean steering, int rotationOffset) Construct a new Wheel part. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationapplyExtraOffset(org.bukkit.Location loc) Override this method to apply extra offset.asString()Get the part as string, for the info command.voidDespawn the stand of this wheel.org.bukkit.inventory.ItemStackgetItem()Overrides the item getter to ignore it for JSON serialization.org.bukkit.inventory.ItemStackThe Configuration and Addon GUI will call this method to get the item to display.Overrides the position getter to ignore it for JSON serialization.The rimdesign of the wheel.floatThe steering rotation offset.booleanIs this wheel moving to left/right?voidsetRimDesignId(String rimDesignId) Change the rim design of this wheel.voidsetSteering(boolean steering) Is this wheel moving to left/right?voidsetSteeringOffset(float steeringOffset) The steering rotation offset.Methods inherited from class nl.sbdeveloper.vehiclesplus.api.vehicles.parts.EquipablePart
canEqual, clone, equals, getColor, hashCode, isColorable, setColor, setItem, spawnStand, toString, updateHolderMethods inherited from class nl.sbdeveloper.vehiclesplus.api.vehicles.parts.Part
getHolder, getOwningVehicle, getRotationOffset, getXOffset, getYOffset, getZOffset, isAddon, isSpawned, refresh, setAddon, setRotationOffset, setXOffset, setYOffset, setZOffset
-
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-offsetyOffset- The y-offsetzOffset- The z-offsetrimDesign- The rim designcolor- 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-offsetyOffset- The y-offsetzOffset- The z-offsetrimDesign- The rim designcolor- The color of the wheelsteering- Is this wheel moving to left/right?rotationOffset- The rotation offset
-
-
Method Details
-
asString
Description copied from class:PartGet the part as string, for the info command. -
applyExtraOffset
public org.bukkit.Location applyExtraOffset(org.bukkit.Location loc) Description copied from class:PartOverride this method to apply extra offset.- Overrides:
applyExtraOffsetin classPart- Parameters:
loc- The input location.- Returns:
- The output location, with the extra offset applied.
-
setRimDesignId
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:
getItemin classEquipablePart
-
getPosition
Overrides the position getter to ignore it for JSON serialization. This is because the position is already stored in the RimDesign.- Overrides:
getPositionin classEquipablePart
-
getPartGUIItem
public org.bukkit.inventory.ItemStack getPartGUIItem()Description copied from class:PartThe Configuration and Addon GUI will call this method to get the item to display.- Specified by:
getPartGUIItemin classPart- Returns:
- The item to display.
-
despawnStand
public void despawnStand()Despawn the stand of this wheel.- Overrides:
despawnStandin classPart
-
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.
-