Class ClickableSign

java.lang.Object
me.block2block.hubparkour.api.signs.ClickableSign

public abstract class ClickableSign extends Object
A generic sign object.
  • Field Details

    • parkour

      protected final IParkour parkour
    • signState

      protected final Sign signState
    • id

      protected int id
  • Constructor Details

    • ClickableSign

      public ClickableSign(IParkour parkour, Sign signState)
    • ClickableSign

      public ClickableSign(int id, IParkour parkour, Sign signState)
  • Method Details

    • refresh

      public abstract void refresh()
      Called when a sign is needing to be refreshed.
    • getType

      public abstract int getType()
      Get the type of the sign.
      Returns:
      the type of the sign.
    • onClick

      public abstract void onClick(Player player)
      What happens when a sign is clicked.
      Parameters:
      player - the player that clicked the sign.
    • getParkour

      public IParkour getParkour()
      Get the parkour this sign is associated with.
      Returns:
      the parkour this sign belongs to.
    • getSignState

      public Sign getSignState()
      Get the Bukkit Sign State of the sign.
      Returns:
      a Bukkit Sign State which represents the actual sign.
    • getId

      public int getId()
      Get the ID of this sign.
      Returns:
      the ID of the sign.
    • setId

      public void setId(int id)
      In the event that this is a new sign, set the ID.
      Parameters:
      id - the id of this sign.
      Throws:
      IllegalStateException - if the ID is already set.