Updates the README to improve readability
This commit is contained in:
parent
b1aefdd9d9
commit
3353916647
147
README.md
147
README.md
@ -10,20 +10,24 @@ see any payment messages. For testing, you'll need to un-set the `paidsigns.paym
|
|||||||
|
|
||||||
As this plugin only listens to sign change events, there are some limitations:
|
As this plugin only listens to sign change events, there are some limitations:
|
||||||
|
|
||||||
1. The plugin is not aware of whether the creation of a sign is successful
|
1. The plugin is not aware of whether the creation of a sign is successful. Setting the appropriate permission might help, but it's not guaranteed
|
||||||
2. It is assumed that any protection plugins run before this plugin, but it's not guaranteed
|
2. It is assumed that any protection plugins run before this plugin checks a sign, but it's not guaranteed
|
||||||
3. Plugins changing the lines on signs when successful might create confusion and mismatches
|
3. Plugins changing the lines on signs when successful might create confusion and mismatches if changes happen before this plugin checks a sign
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
* /addpaidsign <name> <cost> \[permission] \[ignore case] \[ignore color] \[match any condition]
|
An argument marked by "<>" is required to execute the command. An argument marked by "[]" is optional.
|
||||||
* /addpaidsigncondition <name (of a paid sign)> <line number> <string to match> \[executeRegEx] \[ignoreCase]
|
For empty arguments, such as no paid sign permission, you should use empty quotes ("").
|
||||||
\[ignoreColor]
|
|
||||||
* /listpaidsigns \[name (of a paid sign)] \[line number]
|
| Command | Arguments | Permission | Description |
|
||||||
* /editpaidsign <sign name> <property>/<line number> \[new value]/<property> \[new value]
|
| -------- | ------ | ------- | ------- |
|
||||||
* /removepaidsigncondition <name (of a paid sign)> <line number>
|
| /addpaidsign | \<name> \<cost> \[permission] \[ignore case] \[ignore color] \[match any condition] | paidsigns.manage | Used to add a new paid sign |
|
||||||
* /removepaidsign <name (of a paid sign)>
|
| /addpaidsigncondition | \<name (of a paid sign)> \<line number> \<string to match> \[executeRegEx] \[ignoreCase] \[ignoreColor] | paidsigns.manage | Used to add a condition to a paid sign |
|
||||||
* /reload
|
| /listpaidsigns | \[name (of a paid sign)] \[line number] | paidsigns.manage | Used to list registered paid signs or a registered paid sign's conditions |
|
||||||
|
| /editpaidsign | \<sign name> \<property>/\<line number> \[new value]/\<property> \[new value] | paidsigns.manage | Used to modify a registered paid sign or one of its conditions |
|
||||||
|
| /removepaidsigncondition | \<name (of a paid sign)> \<line number> | paidsigns.manage | Used to remove a condition from a registered paid sign |
|
||||||
|
| /removepaidsign | \<name (of a paid sign)> | paidsigns.manage | Used to remove a registered paid sign |
|
||||||
|
| /reload | | paidsigns.reload | Used to reload the configuration file |
|
||||||
|
|
||||||
## Command explanation
|
## Command explanation
|
||||||
|
|
||||||
@ -31,77 +35,110 @@ As this plugin only listens to sign change events, there are some limitations:
|
|||||||
|
|
||||||
This command adds a new paid sign that does nothing until a condition is added.
|
This command adds a new paid sign that does nothing until a condition is added.
|
||||||
|
|
||||||
* name - A recognizable name only used to differentiate between registered paid signs
|
`/addpaidsign <name> <cost> [permission] [ignore case] [ignore color] [match any condition]`
|
||||||
* cost - The cost a player need to pay to create any sign matching the paid sign
|
|
||||||
* permission - If the paid sign is used to represent a plugin sign, the permission should be the permission necessary
|
| Argument | Usage |
|
||||||
for creating the plugin sign. This is used to decide if the plugin sign was created, or the player was denied.
|
| ----- | ----- |
|
||||||
* ignore case - Whether any conditions of the paid sign should ignore case by default, when matching against text (
|
|name | A recognizable name only used to differentiate between registered paid signs |
|
||||||
default uses the config file value).
|
|cost | The cost a player needs to pay to create any sign matching the paid sign |
|
||||||
* ignore color - Whether any condition of the paid sign should ignore color by default, when matching against text (
|
|permission | If the paid sign is used to represent a plugin sign, the permission should be the permission necessary for creating the plugin sign. This is used to decide if the plugin sign was created, or if the player was denied. |
|
||||||
default uses the config file value).
|
|ignore case | Whether any conditions of the paid sign should ignore case by default, when matching against text (default uses the config file value). |
|
||||||
* match any condition - Whether to trigger a paid sign match if a single one of the sign's conditions is true. This is
|
|ignore color | Whether any condition of the paid sign should ignore color by default, when matching against text (default uses the config file value). |
|
||||||
mainly useful if several lines may contain the match string, or if trying to match a word.
|
|match any condition | Whether to trigger a paid sign match if a single one of the sign's conditions is true. This is mainly useful if several lines may contain the match string, or if trying to match a word. |
|
||||||
|
|
||||||
### /addpaidsigncondition
|
### /addpaidsigncondition
|
||||||
|
|
||||||
This adds a condition to a paid sign which is used to decide if a sign created by a player matches the paid sign. Adding
|
This adds a condition to a paid sign which is used to decide if a sign created by a player matches the paid sign. Adding
|
||||||
a paid sign condition to a line that already has one will replace the previous condition.
|
a paid sign condition to a line that already has one will replace the previous condition.
|
||||||
|
|
||||||
* name - The name of the paid sign to add the condition to
|
`/addpaidsigncondition <name (of a paid sign)> <line number> <string to match> [executeRegEx] [ignoreCase] [ignoreColor]`
|
||||||
* line number - The line on the sign (1-4) to search for any matches
|
|
||||||
* string to match - The string or regular expression to look for on a sign
|
| Argument | Usage |
|
||||||
* executeRegEx - Whether to use a regular expression match instead of looking for the exact string
|
| ----- | ----- |
|
||||||
* ignoreCase - Whether this condition should ignore case when trying to match the string (default uses the "parent"
|
| name | The name of the paid sign to add the condition to |
|
||||||
sign's value)
|
| line number | The line on the sign (1-4) to search for any matches |
|
||||||
* ignoreColor - Whether this condition should ignore color when trying to match the string (default uses the "parent"
|
| string to match | The string or regular expression to look for on a sign |
|
||||||
sign's value)
|
| executeRegEx | Whether to use a regular expression match instead of looking for the exact string |
|
||||||
|
| ignoreCase | Whether this condition should ignore case when trying to match the string (default uses the "parent" sign's value) |
|
||||||
|
| ignoreColor | Whether this condition should ignore color when trying to match the string (default uses the "parent" sign's value) |
|
||||||
|
|
||||||
### /listpaidsigns
|
### /listpaidsigns
|
||||||
|
|
||||||
This lists registered paid signs and paid sign conditions. No arguments will print a list of paid signs
|
This lists registered paid signs and paid sign conditions. No arguments will print a list of paid signs
|
||||||
|
|
||||||
* name - The name of the paid sign to see information about
|
`/listpaidsigns [name (of a paid sign)] [line number]`
|
||||||
* line number - The line number of the condition to see information about
|
|
||||||
|
| Argument | Usage |
|
||||||
|
| ----- | ----- |
|
||||||
|
| name | The name of the paid sign to see information about |
|
||||||
|
| line number | The line number of the condition to see information about |
|
||||||
|
|
||||||
### /editpaidsign
|
### /editpaidsign
|
||||||
|
|
||||||
* name - The name of the paid sign to edit
|
This command changes a property of a paid sign or a paid sign condition
|
||||||
* property/line number - The property to edit for the sign, or the line of the condition to edit
|
|
||||||
* new value/property - The new property value if a property was specified in the second argument, or a condition
|
`/editpaidsign <sign name> <property>/<line number> [new value]/<property> [new value]`
|
||||||
property if a line number was specified in the second argument
|
|
||||||
* new value - The new property value of the condition property specified in the third argument
|
| Argument | Usage |
|
||||||
|
| ----- | ----- |
|
||||||
|
| name | The name of the paid sign to edit |
|
||||||
|
| property / line number | The property to edit for the sign (name, cost, permission, ignoreCase, ignoreColor, matchAnyCondition), or the line of the condition to edit |
|
||||||
|
| new value / property | The new property value if a property was specified in the second argument, or a condition property (stringToMatch, executeRegEx, ignoreCase, ignoreColor) if a line number was specified in the second argument |
|
||||||
|
| new value | The new property value of the condition property specified in the third argument |
|
||||||
|
|
||||||
### /removepaidsigncondition
|
### /removepaidsigncondition
|
||||||
|
|
||||||
Removes a paid sign condition from a sign
|
Removes a paid sign condition from a sign
|
||||||
|
|
||||||
* name - The name of the paid sign to remove the condition from
|
`/removepaidsigncondition <name (of a paid sign)> <line number>`
|
||||||
* line number - The line the condition is associated with
|
|
||||||
|
| Argument | Usage |
|
||||||
|
| ----- | ----- |
|
||||||
|
| name | The name of the paid sign to remove the condition from |
|
||||||
|
| line number | The line the condition is associated with |
|
||||||
|
|
||||||
### /removepaidsign
|
### /removepaidsign
|
||||||
|
|
||||||
Removes a registered paid sign
|
Removes a registered paid sign
|
||||||
|
|
||||||
* name - The name of the paid sign to remove
|
`/removepaidsign <name (of a paid sign)>`
|
||||||
|
|
||||||
|
| Argument | Usage |
|
||||||
|
| ----- | ----- |
|
||||||
|
| name | The name of the paid sign to remove |
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
* paidsigns.* - Grants all paid signs permissions
|
| Node | Description |
|
||||||
* paidsigns.manage - Grants the permission to add/remove a paid sign
|
| ------- | ------- |
|
||||||
* paidsigns.reload - Grants the permissions to reload the plugin
|
| paidsigns.* | Grants all paid signs permissions |
|
||||||
* paidsigns.paymentexempt - Makes this player exempt from the cost of paid signs
|
| --paidsigns.manage | Grants the permission to add/remove a paid sign |
|
||||||
|
| --paidsigns.reload | Grants the permissions to reload the plugin |
|
||||||
|
| --paidsigns.paymentexempt | Makes this player exempt from the cost of paid signs |
|
||||||
|
|
||||||
## Configuration options
|
## Configuration options
|
||||||
|
|
||||||
* language - The language to use for all messages displayed to players
|
| Option | Description |
|
||||||
* ignoreCase - Whether to ignore the case (lowercase/uppercase) of the paid sign text. The option can be set on a
|
| ------- | ------- |
|
||||||
per-sign basis, but this value is used if not specified. The correct value depends on whether the plugin signs it
|
| language | The language to use for all messages displayed to players |
|
||||||
should match are case-sensitive or not.
|
| ignoreCase | Whether to ignore the case (lowercase/uppercase) of the paid sign text. The option can be set on a per-sign basis, but this value is used if not specified. The correct value depends on whether the plugin signs it should match are case-sensitive or not. |
|
||||||
* ignoreColor - Whether to ignore any color or formatting applied to the text when trying to match a paid sign's text.
|
| ignoreColor | Whether to ignore any color or formatting applied to the text when trying to match a paid sign's text. The option can be set on a per-sign basis, but this value is used if not specified. The correct value depends on whether the plugin signs it should match allow coloring or not. |
|
||||||
The option can be set on a per-sign basis, but this value is used if not specified. The correct value depends on
|
| refundsEnabled | Whether to enable refunds to the sign creator when a sign detected as a paid sign is broken (payment will always go to the original creator) |
|
||||||
whether the plugin signs it should match allow coloring or not.
|
| refundPercentage | The percentage of the paid sign cost to refund (0-100) |
|
||||||
* refundsEnabled - Whether to enable refunds to the sign creator when a sign detected as a paid sign is broken (payment
|
| refundAlways | Whether to refund when signs that players have paid for are broken by anything. This includes tnt, creepers, pistons and similar |
|
||||||
will always go to the original creator)
|
|
||||||
* refundPercentage - The percentage of the paid sign cost to refund (0-100)
|
## Language customization
|
||||||
* refundAlways - Whether to refund when signs that players have paid for are broken by anything. This includes tnt,
|
|
||||||
creepers, pistons and similar
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
Remember to change the language code to whichever you use for your custom language.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
PaidSigns is licensed under the GNU Public License Version 3.0. This includes every source and resource file. See
|
||||||
|
the HEADER file for a more detailed license description.
|
Loading…
Reference in New Issue
Block a user