Command iConomy - 为每条指令收费
请务必为每个问题提交新的工单!评论区不提供任何帮助!
版本 v10.0.0
概述
Command iConomy 是一个插件,允许服务器管理员为服务器指令设置费用。每当玩家使用某条指令时,该费用将从玩家的 iConomy 账户中扣除。指令通过 Java 正则表达式进行匹配。如果玩家输入的文字与配置规则匹配,Command iConomy 将尝试向玩家收费。Command iConomy 需要 Vault!
例如:为每次召唤的魔法地毯收费,或为不同的套件(kits)添加费用。
配置
要设置指令的价格,请在 prices.yml 中添加一行。Command iConomy 会将正则表达式与用户输入进行匹配。正则表达式允许你针对子指令甚至特定的指令参数分别收费。
典型的配置行如下:^/tp$: 10
匹配子指令的配置行可能如下所示:^/time (day|night)$: 20
指令表达式按从上到下的顺序进行匹配。一旦找到匹配项,Command iConomy 将停止查找并收取配置的金额。如果指令配置的费用为零,处理流程将停止,但不会向玩家收费。这些功能相结合,使得开放式的指令可以单独计费。例如:
^/warp help$: 0
^/warp \S+$: 10
快速正则表达式知识
<<code>>^ = 指令开头
$ = 指令结尾
\S+ = 一个或多个非空白字符<</code>>
为了获得最佳效果,请研究并学习正则表达式!
有关正则表达式的更多信息,请参阅:
指令冷却时间
你现在可以配置在再次对某条指令收费前需要等待的秒数。为此,在指令费用后添加一个空格,然后加上需要等待的秒数。例如:
^/warp \S+$: 10 30
权限
CommandIConomy.Free - 授予所有指令的免费访问权限。
国际化
可以在 config.yml 文件中设置三个额外选项以本地化 Command iConomy 的文本。你需要创建 config.yml 文件。它们分别是:
NoAccountMessage
InsuficientFundsMessage
AccountDeductedMessage
用 (cost) 替换 cost
需要 Vault:
Command iConomy - Charge for each command
PLEASE OPEN A NEW TICKET FOR EVERY ISSUE, THERE WILL BE NO HELP IN COMMENTS!
Version v10.0.0
Overview
Command iConomy is a plugin that allows a server admin to assign a cost to server commands that is deducted from a player's iConomy account whenever a player uses that command. Commands are matched using java regular expressions. If text entered by a player matches a configured rule, Command iConomy will attempt to bill the player. Command iConomy requires Vault!
Examples include charging for each summoned magic carpet, or adding a fee for different kits.
Configuration
To set the price of a command, add a line to prices.yml. Command iConomy matches regular expressions against user input. Regular expressions allow you to charge separately for individual sub-commands or even specific command arguments.
A typical configuration line looks like this: ^/tp$: 10
A configuration line matching sub-commands might look like this: ^/time (day|night)$: 20
Command expressions are matched in order from top to bottom. If a match is found, Command iConomy stops looking for a match and charges the player the configured amount. If the command is configured with a cost of zero, processing will stop but the player will not be charged. Together these features allow open ended commands to be individually charged. Ex:
^/warp help$: 0
^/warp \S+$: 10
Really Quick Regular Expression Info
<<code>>^ = Start of command
$ = End of command
\S+ = One or more non-whitespace characters<</code>>
For best results, please study and learn regular expressions!
For more info on regular expressions, see:
Command Cooldowns
You can now configure a number of seconds before charging a player again for a command. To do so, add a space and then the number of seconds to wait after the command's cost. Ex:
^/warp \S+$: 10 30
Permissions
CommandIConomy.Free - Grants free access to all commands.
Internationalization
Three additional settings can be made in the config.yml file to localize Command iConomy's text. You will have to create config.yml. They are:
NoAccountMessage
InsuficientFundsMessage
AccountDeductedMessage
Substitute (cost) for cost
Requires Vault:
评论 0
登录后参与评分
还没有评论,来抢沙发吧