java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.settings.impl.Horn
All Implemented Interfaces:
Setting

public class Horn extends Object implements Setting
The horn settings.
  • Constructor Details

    • Horn

      public Horn()
      Construct a disabled Horn.
    • Horn

      public Horn(Sounds.Sound sound)
      Construct an enabled Horn.
      Parameters:
      sound - The sound of the horn.
    • Horn

      public Horn(boolean enabled, Sounds.Sound sound)
      Construct a new Horn.
      Parameters:
      enabled - Is the horn enabled?
      sound - The sound of the horn.
  • Method Details

    • horn

      public boolean horn(org.bukkit.Location loc)
      Play the horn if enabled.
      Parameters:
      loc - The location to play the horn.
      Returns:
      True if played, false if not (because not enabled or in cooldown).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isEnabled

      public boolean isEnabled()
      Is the horn enabled?
    • getSound

      public Sounds.Sound getSound()
      The sound of the horn.
    • getCooldown

      public int getCooldown()
      The horning cooldown.
    • setEnabled

      public void setEnabled(boolean enabled)
      Is the horn enabled?
    • setSound

      public void setSound(Sounds.Sound sound)
      The sound of the horn.