Package com.andrei1058.spigot.signapi
Class PacketSign
java.lang.Object
com.andrei1058.spigot.signapi.PacketSign
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(PacketSign sign) Equals.booleanequals(org.bukkit.block.Block block) Check if given block is this sign.Get click listener.This function is applied when sign content is requested internally.org.bukkit.util.VectorGet a sign location.getWorld()Get a sign world name.booleanisInRange(int x, int z) voidrefresh()Refresh sign for nearby users.voidSet click listener.voidsetContent(Function<org.bukkit.entity.Player, List<String>> content) Set content provider.
-
Method Details
-
getWorld
Get a sign world name.- Returns:
- location.
-
getLocation
public org.bukkit.util.Vector getLocation()Get a sign location. UsegetWorld()to get the world.- Returns:
- location.
-
equals
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
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
This function is applied when sign content is requested internally.- Returns:
- sign content.
-
setClickListener
Set click listener.- Parameters:
event- listener.
-
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)
-