Package com.andrei1058.spigot.signapi
Class PacketSign
java.lang.Object
com.andrei1058.spigot.signapi.PacketSign
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(PacketSign sign) Equals.boolean
equals
(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.Vector
Get a sign location.getWorld()
Get a sign world name.boolean
isInRange
(int x, int z) void
refresh()
Refresh sign for nearby users.void
Set click listener.void
setContent
(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)
-