eTokens
你是否曾想过在玩家完成某些行为(例如击杀怪物、其他玩家,或获得难以达成的成就)时给予奖励?
如果是这样,那么这个插件正是为你准备的!
eTokens 是一个相当高级的系统,能够实现上述功能!
本项目是开源的,因此托管在 Github 上!!
要查看此项目,只需点击 此处 或访问
如果你遇到问题并且最近更新了该插件,请确保通过删除插件文件夹内的 "playerdata" 文件夹来重置玩家数据缓存(通常位于 "<服务器路径>/plugins/eTokens/" 中)。
请注意阅读
商店中的命令会临时赋予玩家 OP(管理员权限)。这是为了让他们能够执行所购买的命令。我原本打算通过控制台来执行此操作,但控制台无法访问某些命令(针对玩家的特定命令)。
如果玩家因某些漏洞而获得了 OP 权限,请从商店 YAML 文件中移除 "isCommand"(位于 plugins/eTokens/shops/Shopname.yml),并立即联系我以便我修复此错误。
更新日志
- eTokens 2.1
- 此前玩家无法打开商店,因为他们需要拥有 OP 权限(感谢 @Gh0stbuster 指出此问题)。
- eTokens 2.1
- 修复了一些关键错误
- 玩家现在初始代币数量为 0,而不是 -1
- eTokens 2.0
- 现在可以使用 "ALL" 作为方块类型,代表 Minecraft 中的所有方块
- 商店现在可以出售命令
- 与 Vault 集成(参见 XML)
XML 配置
本插件附带一个默认且易于配置的 XML 文件,允许你(服务器所有者)自动奖励玩家。
XML 非常容易理解。你只需要添加一个 "token" 标签并告诉它你想要做什么即可。
以下是一些示例以及各属性的含义:
| XML 属性 | 作用 | 值 |
| objective | 设置玩家必须完成的指标,以便获得代币 | block-break, kill, achievement |
| token-amount | 你希望奖励给玩家的代币数量 | 0 到 2147483647 之间的任意数字 |
| block-amount | 仅在与 "block-break" 指标一起使用时使用,表示玩家需要破坏的方块数量 | 0 到 2147483647 之间的任意数字 |
| block-type | 用户需要破坏的方块类型 | 见此处 现在也可以使用 "all" 代表所有方块 |
| achievement | 仅在与 "achievement" 指标一起使用时使用。这是用户需要获得的成就名称 | 见此处 |
| entity-type | 仅在与 "kill" 指标一起使用时使用。这是玩家需要击杀的怪物类型 | 见此处 | |
| kills | 玩家需要击杀的生物数量 | 0 到 2147483647 之间的任意数字 |
| repeatable | 指示指标是否可以被玩家重复完成(目前仅适用于 kills 和 block-break) | true 或 false |
| use-tokens | 指示是否给予玩家 eTokens | true 或 false(默认为 true) |
| money | 你希望给予玩家的货币数量(使用 Vault) | 0.0 到 Infinity 之间的任意浮点数 |
以下是一个示例 XML 文件:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tokens>
<token block-amount="10" block-type="DIAMOND_ORE" objective="block-break" token-amount="10">
做得好 {PLAYER},因破坏 {BLOCK-AMOUNT} 个 {BLOCK-TYPE} 方块,你收到了 {TOKEN-AMOUNT} 个代币!
</token>
<token achievement="BUILD_PICKAXE" objective="achievement" token-amount="10">
你因获得成就 {ACHIEVEMENT} 而收到了 {TOKEN-AMOUNT} 个代币!
</token>
<token entity-type="ZOMBIE" kills="10" objective="kill" repeatable="true" token-amount="10">
你因击杀 {KILLS} 个 {ENTITY-TYPE} 而收到了 {TOKEN-AMOUNT} 个代币!
</token>
</tokens>
命令:
本插件附带的命令允许你控制每个玩家的代币数量。
| 命令 | 描述 |
| /token add <玩家> <数量> | 向玩家的账户添加指定数量的代币 |
| /token [remove/take] <Player> <Amount> | 从指定玩家的账户中移除相应的代币 |
| /token set <Player> <Amount> | 设置该玩家的代币数量 |
| /tokens give <Player> <Amount> | 给予该玩家一些你的代币 |
| /shop create <Name> | 创建一个具有指定名称的商店(区分大小写) |
| /shop add <ShopName> <Price> | 将当前手持的物品添加到指定的商店 |
| /shop <ShopName> | 打开指定的商店(输入错误的商店名时会显示可用的商店列表) |
| /shop command <ShopName> <Price> <Command> | 向商店添加一个命令并设定相应价格。注意:在需要填入购买者名字的地方使用 {PLAYER},例如 /kill {PLAYER} |
权限:
所有命令(包括 /shop)在执行前都需要相应的权限节点。
你可以在下方找到这些权限及其对应的命令。
| 权限 | 命令 |
| etokens.admin | /token add |
| etokens.admin | /token [remove/take] |
| etokens.admin | /token set |
| etokens.give | /token give |
| etokens.shop.create | /shop create |
| etokens.shop.create | /shop add |
| etokens.shop.create | /shop command |
| etokens.shop.<ShopName> | 这将赋予玩家打开指定商店的权限 |
商店
商店功能简单易用,允许你向服务器上的玩家出售物品或命令。
下表列出了用于利用商店功能的命令,并对每个命令的作用以及它允许玩家执行的操作进行了详细说明。
| 命令 | 作用 | 玩家可执行的操作 |
| /shop create <Name> | 创建一个具有指定名称的商店(区分大小写) | 允许玩家打开此商店(如果拥有相应权限) |
| /shop add <ShopName> <Price> | 将当前手持的物品添加到指定的商店 | 允许玩家以你设定的价格购买你手中所持的物品 |
| /shop <ShopName> | 打开指定的商店(输入错误的商店名时会显示可用的商店列表) | 允许玩家查看指定商店的内容 |
| /shop command <ShopName> <Price> <Command> | 向商店添加一个命令并设定相应价格。 | 允许玩家在购买后执行该命令 |
捐赠:
我们欢迎任何形式的捐赠。如果你愿意捐赠,请点击下方的按钮:
eTokens
Have you ever wanted to reward you players when they do something such as kill a mob, a player or for earning a hard-to-get achievement?
If so then this is the plugin for you!
eTokens is a fairly advanced system that will allow you to do just that!
This project is open-source and, as a result is on Github!!
To view this project, just click here or go to
If you're having issues and you've recently updated the plugin. Make sure you have reset the player data cache by deleting the "playerdata" folder inside of the plugin folder (Usually found in "<ServerPath>/plugins/eTokens/").
Please Read
The commands in the shop temporary OP the player. This is to allow them to execute the command they've bought. I was originally going to do this through console however, console doesn't have access to some commands (Player specific).
If players are getting OP through some glitch with this remove the "isCommand" in the shops YAML file (located in plugins/eTokens/shops/Shopname.yml) and contact me immediately so that I can fix the bug.
Updates
- eTokens 2.1
- Players couldn't open shops before as they required to be OP (Thanks to @Gh0stbuster) for pointing this out.
- eTokens 2.1
- Fixed some vital errors
- Players now start with 0 tokens instead of -1
- eTokens 2.0
- You can now use "ALL" as a block-type to represent all the blocks in Minecraft
- Shops can now sell commands
- Integration with Vault (See XML)
XML
With this plugin comes a default, easy to configure, XML file that allows you, the server owner, to automatically reward players.
The XML is really easy to grasp. All you need to do is add a "token" tab and tell it what you want to do.
Below are some example and what attribute means what.
| XML Attribute | What it does | Values |
| objective | This sets the objective that the player needs to complete in order to receive the token | block-break, kill, achievement |
| token-amount | This is the amount of tokens you want to reward the player with | Any number between 0 and 2147483647 |
| block-amount | This should only be used with the "block-break" objectives, this is how many blocks the player needs to break | Any number between 0 and 2147483647 |
| block-type | The type of block that the user needs to break | See here Can now be "all" for all blocks |
| achievement | This should only be used with the "achievement" objective. This is the name of the achievement that the user needs to get | See here |
| entity-type | This should only be used with the "kills" objective. This is the type of mob that the player needs to kill | See here | |
| kills | The amount of entities the player needs to kill | Any number between 0 and 2147483647 |
| repeatable | States whether an objective can be repeated by the player (Currently only works with kills and block-break) | true or false |
| use-tokens | States whether you want to give the player eTokens | true or false (default true) |
| money | The amount of money you want to give to the player (Uses vault) | Any double between 0.0 and Infinity |
Below is an example XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tokens>
<token block-amount="10" block-type="DIAMOND_ORE" objective="block-break" token-amount="10">
Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!
</token>
<token achievement="BUILD_PICKAXE" objective="achievement" token-amount="10">
You have received {TOKEN-AMOUNT} tokens for getting the achievement {ACHIEVEMENT}!
</token>
<token entity-type="ZOMBIE" kills="10" objective="kill" repeatable="true" token-amount="10">
You have received {TOKEN-AMOUNT} tokens for killing {KILLS} {ENTITY-TYPE}(s)!
</token>
</tokens>
Commands:
The commands that come with this plugin allow you to control how many tokens each player has.
| Command | Description |
| /token add <Player> <Amount> | Add a specified amount of tokens to the players' account |
| /token [remove/take] <Player> <Amount> | Remove specified tokens to this players' account |
| /token set <Player> <Amount> | Set this players token count |
| /tokens give <Player> <Amount> | Give this player some of your tokens |
| /shop create <Name> | Create a shop with the specified name (Case sensitive) |
| /shop add <ShopName> <Price> | Add the currently held item to the specified shop |
| /shop <ShopName> | Open a specified shop (Typing in a wrong shop will show available shops) |
| /shop command <ShopName> <Price> <Command> | Add a command to the shop with the specified price. Note: Use {PLAYER} where you want to put the player who purchases' name e.g. /kill {PLAYER} |
Permissions:
All commands (Even the /shop) need a permission node before the user can execute it.
You can find these permissions and their corresponding commands below
| Permission | Command |
| etokens.admin | /token add |
| etokens.admin | /token [remove/take] |
| etokens.admin | /token set |
| etokens.give | /token give |
| etokens.shop.create | /shop create |
| etokens.shop.create | /shop add |
| etokens.shop.create | /shop command |
| etokens.shop.<ShopName> | This will give the player permission to open the specified shop |
Shop
The shop feature is simple to use that gives you the ability to sell items/commands to the players on your server!]
Below is a table with commands that allow you to utilize the shop feature and it gives you a detailed description of what the commands does and what it allows the player to do.
| Command | What It Does | What the player can do |
| /shop create <Name> | Creates a shop with the specified name (Case sensitive) | Allows the player to open this shop (If they have permission) |
| /shop add <ShopName> <Price> | Add the currently held item to the specified shop | Allows the player to buy the item that you're holding for the price that you've set |
| /shop <ShopName> | Open a specified shop (Typing in a wrong shop will show available shops) | Allows the player to see the specified shops' contents |
| /shop command <ShopName> <Price> <Command> | Add a command to the shop with the specified price. | Allows the player to execute the command when bought |
Donations:
Donations are always welcome. If you feel like donating click the button below:
评论 0
登录后参与评分
还没有评论,来抢沙发吧