Improves some README information

This commit is contained in:
Kristian Knarvik 2022-10-20 11:50:54 +02:00
parent 04cfd1b89e
commit b0c3fea730

View File

@ -1,7 +1,7 @@
# Paid signs
The paid-signs plugin is a plugin that lets you add costs for creating plugin signs. This allows restricting usage of
signs such as CraftBook's gate/lift and other signs while still allowing every player to use the signs.
signs such as CraftBook's gate/lift and other signs while still allowing every player to create the signs.
Note: OP players, and players with the '*' permission will have the `paidsigns.paymentexempt` permission and will not
see any payment messages. For testing, you'll need to un-set the `paidsigns.paymentexempt` permission.
@ -25,8 +25,9 @@ There are three ways this can be solved:
1. Make the player (or anyone else) place an empty sign in the same location and break it again. The player should be
refunded as long as refunds are enabled.
2. Reload PaidSigns. The player should be refunded as long as refunds are enabled.
3. Restart the server. The player should be refunded as long as refunds are enabled. Never place a new paid sign in this
situation, as the old sign will be overwritten, and the ability to refund the player automatically will be lost.
3. Restart the server. The player should be refunded as long as refunds are enabled. Never place a new paid sign in the
same location in this situation, as the old sign will be overwritten, and the ability to refund the player
automatically will be lost.
### Players have to pay for signs, even if the plugin sign isn't created
@ -44,6 +45,14 @@ This plugin is known to be helpful with two tasks:
2. Add a swearing jar/swearing filter to the server. This can be done with a paid sign matching ANY condition, where the
list of swear words is given as a regEx. The same regEx should be added for each of the four sign lines.
## Custom parser
Before anything else, it's important to note that as an experiment, I used a custom command-parser for this plugin. This
means that sign names can contain spaces, as long as the name is in quotes. In most cases, this actually works fine,
even though it differs a lot from the default behavior, but if you tab-complete the first word in the name first, and
then try to tab-complete the rest, tab-completion will fill in the second world with the entire name, which is
unfortunate. That's really just how tab-completion works, and not something I think I can do anything with.
## Commands
An argument marked by "<>" is required to execute the command. An argument marked by "[]" is optional. For empty
@ -97,10 +106,11 @@ a paid sign condition to a line that already has one will replace the previous c
This lists registered paid signs and paid sign conditions. No arguments will print a list of paid signs
`/listpaidsigns [name (of a paid sign)] [line number]`
`/listpaidsigns [page number]/[name (of a paid sign)] [line number]`
| Argument | Usage |
| ----- | ----- |
| page number | Paid signs are listed 7 at a time, so the page number is used to see the next 7 |
| name | The name of the paid sign to see information about |
| line number | The line number of the condition to see information about |
@ -161,9 +171,11 @@ Removes a registered paid sign
## Language customization
All strings, even time units, are customizable. If you place a strings.yml file in the plugin folder, it will take
priority over built-in languages. If you want to change strings, look at PaidSigns/src/main/resources/strings.yml for
the proper keys. All strings have the format: ENUM: "Displayed string". The enum must be identical as it defines which
string you have changed. All strings belonging to a language are beneath the language code and indented with two spaces.
priority over built-in languages. If you want to change strings, look
at [PaidSigns/src/main/resources/strings.yml](https://git.knarcraft.net/EpicKnarvik97/PaidSigns/src/branch/master/src/main/resources/strings.yml)
for the proper keys. All strings have the format: ENUM: "Displayed string". The enum must be identical as it defines
which string you have changed. All strings belonging to a language are beneath the language code and indented with two
spaces.
The easiest way to add a new language is to copy an existing language and paste it into your custom strings.yml and
change strings as necessary. If you don't include all strings, the remaining will use the built-in English translation.