A minimal Spigot plugin for displaying continuously updated PlaceholderAPI placeholders on signs.
Go to file
EpicKnarvik97 66c45e00e2
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
Adds a copySign command and stuff
Adds a new copySign command that copies all info about a sign, including current lines, placeholders, waxed state, dye for each side, and glow state for each side.
Renames editSign to setSignLine to avoid collision with EssentialsX's editSign
Reduces viewSign to a single command
Makes viewSign display the looked at sign, instead of creating a session
Adds some additional messages
Adds missing documentation to the README
2024-04-23 17:29:35 +02:00
src/main Adds a copySign command and stuff 2024-04-23 17:29:35 +02:00
.gitignore Initial commit 2023-04-05 22:02:29 +02:00
Jenkinsfile Adds Jenkinsfile 2023-04-06 17:44:45 +02:00
pom.xml Greatly improves display of text 2024-04-21 21:26:16 +02:00
README.md Adds a copySign command and stuff 2024-04-23 17:29:35 +02:00

Placeholder Signs

This is a minimal plugin created for a single purpose: Displaying placeholders from PlaceholderAPI on signs. Note that this plugin only works for placeholders which do not require a player, as the same text will be displayed to everyone!

How it works: After installing this plugin, whenever a sign is changed to contain a placeholder replaced by PlaceholderAPI, the location of the sign, and the lines containing placeholders are saved. Those lines are updated at a set pace by using the saved original lines, and letting PlaceholderAPI replace them. Any color, formatting or RGB color codes in the original text will be converted each time the sign is updated.

The /editSign command is basically just a command to allow placeholders that won't fit on a sign to be used. As an additional benefit, formatting, color and RGB color codes are automatically converted whenever the command is used to change sign text.

Note that when clicking a sign after using /editSign, a SignChangeEvent is triggered. This means that the sign text won't be changed unless the player passes all world protection checks.

Commands

Command Arguments Description
/setSignLine <line> <text> <text> ... Sets the text of the sign line (1-4) to the given input. Then right-click the sign to update.
/viewSign [raw true/false] [placeholders true/false] Allows the player to view the full contents and details of the looked at sign. If "raw" is true, formatting codes are displayed. If placeholders is true, stored placeholders are displayed.
/copySign Allows the player to copy the sign they are currently looking at to another sign, including placeholders, formatting codes, dye and waxed state.

Permissions

Permission Description
placeholdersigns.* Gives all permissions.
placeholdersigns.edit Allows unrestricted use of the /setSignLine command.
placeholdersigns.edit.use Allows use of the /setSignLine command.
placeholdersigns.edit.bypass-waxed Allows use of the /setSignLine command on a waxed sign.
placeholdersigns.placeholder Allows a player to make signs containing placeholders. Without this, placeholders are treated as normal text.
placeholdersigns.copy Allows unrestricted use of the /copySign command.
placeholdersigns.copy.use Allows use of the /copySign command.
placeholdersigns.copy.bypass-waxed Allows pasting a sign copied with /copySign onto a waxed sign.