EpicKnarvik97
f8ca5705a5
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
|
||
---|---|---|
src/main | ||
.gitignore | ||
Jenkinsfile | ||
pom.xml | ||
README.md |
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. | |
/setPlaceholderUpdateDelay | <delay> | Sets the update delay in ticks for the placeholder sign you are currently looking at. Use "null" to un-set the value. 1 second = 20 ticks. |
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 |
placeholdersigns.setdelay | false | Allows use of the /setPlaceholderUpdateDelay command |