A minimal Spigot plugin for displaying continuously updated PlaceholderAPI placeholders on signs.
Go to file
EpicKnarvik97 a34c63b7e2
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
Implements #4
2024-04-29 19:29:55 +02:00
src/main Implements #4 2024-04-29 19:29:55 +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 Implements #4 2024-04-29 19:29:55 +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 /setSignLine 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.

Commands

Note that commands have some restrictions in place, so giving the weakest permissions to any player should be safe:

  • Players cannot create placeholder signs with any commands without the placeholdersigns.placeholder permission.
  • Players cannot cause a destructive action on a waxed sign without the correct bypass permission.
  • All sign changes are run through the SignChangeEvent, so the player cannot edit a sign if any protection plugin would prevent them from editing the sign normally.
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] Shows the full contents and details of the sign you are currently looking at. If "raw" is true, formatting codes are displayed. If placeholders is true, stored placeholders are displayed.
/copySign Copies the sign you are currently looking at to another sign, including placeholders, formatting codes, dye and waxed state.
/copySignText [side] [source line] [target line] Copies the text of the sign you are currently looking at to another sign, including placeholders and formatting codes. If no argument is given, both sides are copied, and the front text is copies to the side of the target sign you click. If a side is specified, the text of that side is copied, and pasted to the sign side you click (use this as the sign side to select the side you are looking at when executing the command). The source line argument is used to only copy a single line from the selected sign side. The target line argument is used to specify the line to paste to (defaults to same as the source line) on the clicked side.
/unWaxSign Removes the wax from the sign you are currently looking at.

Permissions

Permission Default Description
placeholdersigns.* op Gives all permissions.
placeholdersigns.minimal true Allows minimal access to /setSignLine, /copySign, /copySignText and /viewSign on un-waxed signs.
placeholdersigns.edit false Allows unrestricted use of the /setSignLine command.
placeholdersigns.edit.use false Allows use of the /setSignLine command.
placeholdersigns.edit.bypass-waxed false Allows use of the /setSignLine command on a waxed sign.
placeholdersigns.placeholder false Allows a player to make signs containing placeholders. Without this, placeholders are treated as normal text for all commands, and when editing sign text.
placeholdersigns.view false Allows a player to use the /viewSign command.
placeholdersigns.copy false Allows unrestricted use of the /copySign and /copySignText commands.
placeholdersigns.copy.use false Allows use of the /copySign and /copySignText commands.
placeholdersigns.copy.bypass-waxed false Allows pasting a sign copied with /copySign and /copySignText onto a waxed sign.
placeholdersigns.unwax false Allows use of the /unWaxSign command