2022-02-18 00:57:08 +01:00
|
|
|
# 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.
|
|
|
|
|
2022-03-03 11:52:25 +01:00
|
|
|
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.
|
|
|
|
|
2022-02-18 00:57:08 +01:00
|
|
|
## 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
|
|
|
|
2. It is assumed that any protection plugins run before this plugin, but it's not guaranteed
|
2022-02-18 01:37:47 +01:00
|
|
|
3. Plugins changing the lines on signs when successful might create confusion and mismatches
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
2022-03-02 00:37:00 +01:00
|
|
|
* /addpaidsign <name> <cost> \[permission] \[ignore case] \[ignore color] \[match any condition]
|
2022-02-18 23:16:47 +01:00
|
|
|
* /addpaidsigncondition <name (of a paid sign)> <line number> <string to match> \[executeRegEx] \[ignoreCase]
|
|
|
|
\[ignoreColor]
|
2022-02-25 19:41:43 +01:00
|
|
|
* /listpaidsigns \[name (of a paid sign)] \[line number]
|
2022-03-15 14:31:25 +01:00
|
|
|
* /editpaidsign <sign name> <property>/<line number> \[new value]/<property> \[new value]
|
2022-02-18 23:16:47 +01:00
|
|
|
* /removepaidsigncondition <name (of a paid sign)> <line number>
|
|
|
|
* /removepaidsign <name (of a paid sign)>
|
2022-02-27 15:49:25 +01:00
|
|
|
* /reload
|
|
|
|
|
|
|
|
## Command explanation
|
|
|
|
|
|
|
|
### /addpaidsign
|
|
|
|
|
|
|
|
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
|
|
|
|
* 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
|
|
|
|
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 (
|
|
|
|
default uses the config file value).
|
|
|
|
* ignore color - Whether any condition of the paid sign should ignore color by default, when matching against text (
|
|
|
|
default uses the config file value).
|
2022-03-02 00:37:00 +01:00
|
|
|
* 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.
|
2022-02-27 15:49:25 +01:00
|
|
|
|
|
|
|
### /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
|
|
|
|
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
|
|
|
|
* 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
|
|
|
|
* 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
|
|
|
|
|
|
|
|
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
|
|
|
|
* line number - The line number of the condition to see information about
|
|
|
|
|
2022-03-15 14:31:25 +01:00
|
|
|
### /editpaidsign
|
|
|
|
|
|
|
|
* name - The name of the paid sign to edit
|
|
|
|
* 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
|
|
|
|
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
|
|
|
|
|
2022-02-27 15:49:25 +01:00
|
|
|
### /removepaidsigncondition
|
|
|
|
|
|
|
|
Removes a paid sign condition from a sign
|
|
|
|
|
|
|
|
* name - The name of the paid sign to remove the condition from
|
|
|
|
* line number - The line the condition is associated with
|
|
|
|
|
|
|
|
### /removepaidsign
|
|
|
|
|
|
|
|
Removes a registered paid sign
|
|
|
|
|
|
|
|
* name - The name of the paid sign to remove
|
|
|
|
|
|
|
|
## Permissions
|
|
|
|
|
|
|
|
* paidsigns.* - Grants all paid signs permissions
|
|
|
|
* paidsigns.manage - Grants the permission to add/remove a paid sign
|
|
|
|
* paidsigns.reload - Grants the permissions to reload the plugin
|
2022-02-28 15:06:58 +01:00
|
|
|
* paidsigns.paymentexempt - Makes this player exempt from the cost of paid signs
|
|
|
|
|
|
|
|
## Configuration options
|
|
|
|
|
2022-03-02 00:37:00 +01:00
|
|
|
* language - The language to use for all messages displayed to players
|
2022-02-28 15:06:58 +01:00
|
|
|
* 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.
|
|
|
|
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.
|
2022-03-02 14:05:20 +01:00
|
|
|
* refundsEnabled - Whether to enable refunds to the sign creator when a sign detected as a paid sign is broken (payment
|
2022-02-28 15:06:58 +01:00
|
|
|
will always go to the original creator)
|
2022-03-02 14:05:20 +01:00
|
|
|
* refundPercentage - The percentage of the paid sign cost to refund (0-100)
|
|
|
|
* refundAlways - Whether to refund when signs that players have paid for are broken by anything. This includes tnt,
|
|
|
|
creepers, pistons and similar
|