Class PacketSign

java.lang.Object
com.andrei1058.spigot.signapi.PacketSign

public class PacketSign extends Object
  • Method Details

    • getWorld

      public String getWorld()
      Get a sign world name.
      Returns:
      location.
    • getLocation

      public org.bukkit.util.Vector getLocation()
      Get a sign location. Use getWorld() to get the world.
      Returns:
      location.
    • equals

      public boolean equals(PacketSign sign)
      Equals.
      Parameters:
      sign - sign.
      Returns:
      true if the signs have the same location.
    • equals

      public boolean equals(org.bukkit.block.Block block)
      Check if given block is this sign.
      Parameters:
      block - block to be checked.
      Returns:
      true if the given block is this sign.
    • setContent

      public void setContent(Function<org.bukkit.entity.Player,List<String>> content)
      Set content provider.
      Parameters:
      content - content function. This function wil be applied to a player when he will request this sign lines. It is useful for language systems.
    • getContent

      public Function<org.bukkit.entity.Player,List<String>> getContent()
      This function is applied when sign content is requested internally.
      Returns:
      sign content.
    • setClickListener

      public void setClickListener(PacketSign.SignClickEvent event)
      Set click listener.
      Parameters:
      event - listener.
    • getClickListener

      public PacketSign.SignClickEvent getClickListener()
      Get click listener.
      Returns:
      click listener for that sign.
    • refresh

      public void refresh()
      Refresh sign for nearby users.
    • isInRange

      public boolean isInRange(int x, int z)