Difference between revisions of "SignLink"
Line 8: | Line 8: | ||
<pre>/variable edit varname set newvalue</pre> | <pre>/variable edit varname set newvalue</pre> | ||
− | == | + | ==Variables in variables== |
As of version 1.16.5-v1, it is possible to declare variable names inside the value for a variable. For example, you can do: | As of version 1.16.5-v1, it is possible to declare variable names inside the value for a variable. For example, you can do: | ||
Line 18: | Line 18: | ||
The following commands are supported by SignLink. For in-game information you can use /help. The /variable command has alias /var. | The following commands are supported by SignLink. For in-game information you can use /help. The /variable command has alias /var. | ||
− | + | {| class="wikitable" | |
− | Turns sign updating on or | + | |- |
− | + | ! style="width: 25%" | Command | |
− | Reloads the variable values in values.yml | + | ! Description |
− | /variable list | + | |- |
− | Lists all variables you can edit | + | | /togglesignupdate |
− | /variable deleteall | + | | Turns sign updating on or off |
− | Deletes all variables | + | |- |
− | /variable deleteunused | + | | /reloadsignlink |
− | Deletes all unused (not on sign) variables | + | | Reloads the variable values in values.yml |
− | /variable edit [name] | + | |- |
− | Changes the variable you are editing. Can be chained with other commands. | + | | /variable list |
− | /variable forplayers [names] | + | | Lists all variables you can edit |
− | Changes for which players the variable is edited Only the set players will see the changes you do on the variable | + | |- |
− | /variable set [value] | + | | /variable deleteall |
− | Sets the currently editing variable's value | + | | Deletes all variables |
− | /variable get | + | |- |
− | Gets the currently editing variable's value | + | | /variable deleteunused |
− | /variable setticker [args] | + | | Deletes all unused (not on sign) variables |
− | Sets a ticker mode for a variable to animate the text. Arguments: | + | |- |
− | + | | /variable edit [name] | |
− | /variable setticker [interval] [left/right/blink/none] | + | | Changes the variable you are editing. Can be chained with other commands. |
− | /variable setticker [left/right/blink/none] | + | |- |
− | /variable setticker [interval] | + | | /variable forplayers [names] |
− | /variable delete (force) | + | | Changes for which players the variable is edited Only the set players will see the changes you do on the variable |
− | Deletes the variable if it is not used. If force is specified, the variable is removed anyhow. | + | |- |
+ | | /variable set [value] | ||
+ | | Sets the currently editing variable's value | ||
+ | |- | ||
+ | | /variable get | ||
+ | | Gets the currently editing variable's value | ||
+ | |- | ||
+ | | /variable setticker [args] | ||
+ | | Sets a ticker mode for a variable to animate the text. Arguments:<br>[left/right/blink/none] [interval]<br>/variable setticker [interval] [left/right/blink/none]<br>/variable setticker [left/right/blink/none]<br>/variable setticker [interval] | ||
+ | |- | ||
+ | | /variable delete (force) | ||
+ | | Deletes the variable if it is not used. If force is specified, the variable is removed anyhow. | ||
+ | |} | ||
==Configuration== | ==Configuration== |
Revision as of 14:46, 1 October 2023
This page is Work in Progress!
RyanDo is currently working on this page. We recommend you to Create an account or Login if you already have an account. |
Command blocks
To change variables using command blocks, you can chain the edit and set commands.
/variable edit varname set newvalue
Variables in variables
As of version 1.16.5-v1, it is possible to declare variable names inside the value for a variable. For example, you can do:
/variable edit message set Hello, %playername%! It is %time%
And now putting %message% on signs (or in other variables!) will display the values of playername and time in-place. This can also be used to alias long variable names, so they can fit on signs.
Commands
The following commands are supported by SignLink. For in-game information you can use /help. The /variable command has alias /var.
Command | Description |
---|---|
/togglesignupdate | Turns sign updating on or off |
/reloadsignlink | Reloads the variable values in values.yml |
/variable list | Lists all variables you can edit |
/variable deleteall | Deletes all variables |
/variable deleteunused | Deletes all unused (not on sign) variables |
/variable edit [name] | Changes the variable you are editing. Can be chained with other commands. |
/variable forplayers [names] | Changes for which players the variable is edited Only the set players will see the changes you do on the variable |
/variable set [value] | Sets the currently editing variable's value |
/variable get | Gets the currently editing variable's value |
/variable setticker [args] | Sets a ticker mode for a variable to animate the text. Arguments: [left/right/blink/none] [interval] /variable setticker [interval] [left/right/blink/none] /variable setticker [left/right/blink/none] /variable setticker [interval] |
/variable delete (force) | Deletes the variable if it is not used. If force is specified, the variable is removed anyhow. |
Configuration
The linkedsigns.txt contains information of where signs are located. The values.yml sets the (standard) usable keys.
# In here you can set default values for this plugin. # The ticker property can be LEFT, RIGHT or NONE and sets the direction message is 'ticked'. # tickerInterval sets the amount of ticks (1/20 of a second) are between the ticker update. # The value is the thing to display or tick. # To use colors in your text, use the § sign followed up by a value from 0 - F. # Example: §cRed to display a red colored 'Red' message. # You can find all color codes on the internet (they may use & there, ignore that!) sign: ticker: NONE value: This is a regular message you can set and is updated only once. test: tickerInterval: 3 ticker: LEFT value: 'This is a test message being ticked from right to left.'
Placeholders
Signlink supports the PlaceholderAPI plugin in both directions. This means that you can use Signlink to display placeholders on signs, or use signlink variables in other plugins that support placeholders.
- You can use signlink variables in other plugins by prefixing it with sl_. For example, %sl_time% will display the time variable.
- Adding placeholder names to the 'autoUpdateVariables' list in SignLink's config.yml will make them work on signs, with the same name.
- To display long placeholder names on signs, you can use a shorter variable name and set its value to %placeholder_name%
Permissions and commands
Use /togglesignupdate to turn sign updating on or off, just in case someone made a huge amount of updating signs that causes lag. Permission nodes (Bukkit permissions):
signlink.addsign: description: Allows you to build signs containing variables default: op signlink.toggleupdate: description: Allows you to set if signs are being updated or not default: op signlink.reload: description: Allows you to reload the values.yml default: op