WorkstationCommands
这是我发布的第一款 Minecraft 插件!
通过此插件,你可以允许玩家从任何位置打开任意工作台的菜单。
你可以在配置文件中启用/禁用命令,并管理每个命令的别名。
使用 /wcreload 可以在不重启服务器的情况下重新加载配置文件。
SPONGE ISSUES
当前版本的 Sponge API 不允许动态注销和注册命令。这意味着 /wcreload 不属于 Sponge 实现的一部分!!!
Configuration
此插件的配置非常简单!
如果找不到某条命令的配置项,该命令默认会被禁用。因此,你可以从配置文件中删除某个命令来禁用它,或者将 "enabled" 标志设置为 false。
你还可以为命令定义一个别名列表。如果未提供此列表,则不会创建任何别名。
若要仅启用工作台,你的配置文件可能如下所示:
wccraft:
enabled: true
就是这样,只有两行。
现在假设你不想运行 /wccraft,而是希望用另一个命令来打开 GUI。
这时就需要用到别名配置了。让我们将 /craft 添加为 /wccraft 的别名(这包含在默认配置中)
wccraft:
enabled: true
aliases:
- craft
注意,在注册别名时无需包含前斜杠。
Commands
/wcreload: 重新加载配置文件。
/wccraft [target]: 为执行者或指定的目标打开工作台 GUI。
/wcstonecutter [target]: 为执行者或指定的目标打开切石机 GUI。
/wcloom [target]: 为执行者或指定的目标打开织布机 GUI。
/wccartography [target]: 为执行者或指定的目标打开制图台 GUI。
/wcfurnace [target]: 为执行者或指定的目标打开熔炉 GUI。
/wcblastfurnace [target]: 为执行者或指定的目标打开高炉 GUI。
/wcsmoker [target]: 为执行者或指定的目标打开烟熏炉 GUI。
/wcsmithing [target]: 为执行者或指定的目标打开锻造台 GUI。
/wcanvil [target]: 为执行者或指定的目标打开铁砧 GUI。
/wcenchant [target]: 为执行者或指定的目标打开附魔台 GUI。
/wcgrindstone [target]: 为执行者或指定的目标打开砂轮 GUI。
/wcbrew [target]: 为执行者或指定的目标打开酿造台 GUI。
Player Permissions
授予所有玩家的权限
wc.craft: 允许玩家使用 /wccraft。
wc.stonecutter: 允许玩家使用 /wcstonecutter。
wc.loom: 允许玩家使用 /wcloom。
wc.cartography: 允许玩家使用 /wccartography。
wc.furnace: 允许玩家使用 /wcfurnace。
wc.blastfurnace: 允许玩家使用 /wcblastfurnace。
wc.smoker: 允许玩家使用 /wcsmoker。
wc.smithing: 允许玩家使用 /wcsmithing。
wc.anvil: 允许玩家使用 /wcanvil。
wc.enchant: 允许玩家使用 /wcenchant。
wc.grindstone: 允许玩家使用 /wcgrindstone。
wc.brew: 允许玩家使用 /wcbrew。
Operator Permissions
授予所有操作员的权限
wc.reload: 允许玩家使用 /wcreload。
wc.craft.other: 允许玩家使用 /craft [target]。
wc.stonecutter.other: 允许玩家使用 /stonecutter [target]。
wc.loom.other: 允许玩家使用 /loom [target]。
wc.cartography.other: 允许玩家使用 /cartography [target]。
wc.furnace.other: 允许玩家使用 /furnace [target]。
wc.blastfurnace.other: 允许玩家使用 /blastfurnace [target]。
wc.smoker.other: 允许玩家使用 /smoker [target]。
wc.smithing.other: 允许玩家使用 /smithing [target]。
wc.anvil.other: 允许玩家使用 /anvil [target]。
wc.enchant.other: 允许玩家使用 /enchant [target]。
wc.grindstone.other: 允许玩家使用 /grindstone [target]。
wc.brew.other: 允许玩家使用 /brew [target]。
WorkstationCommands
This is my first published minecraft plugin!
With this plugin, you can allow players to open menus for any workstation from anywhere.
You can enable/disable commands in the config, as well as manage the aliases of each command.
Use /wcreload to reload the config without restarting.
SPONGE ISSUES
The current version of the Sponge API does not allow for dynamic unregistration and registration of commands. This means that /wcreload IS NOT A PART OF THE SPONGE IMPLEMENTATION!!!
Configuration
Configuration for this plugin is very simple!
Commands default to being disabled if their config is not found, so you can remove a command from the config to disable it, or set the "enabled" flag to false.
You can also define a list of aliases for the command. If this list is not found, it doesn't create any.
To enable only the crafting table, your config may look like this:
wccraft:
enabled: true
That's it, just two lines.
Now let's say you dont want to run /wccraft, and you want a different command to open the gui.
This is where the aliases config comes into play. Let's add /craft as an alias to /wccraft (This is in the default config)
wccraft:
enabled: true
aliases:
- craft
Note that you don't need to include the forward slash when registering the alias.
Commands
/wcreload: Reloads the configuration file.
/wccraft [target]: Opens the crafting table GUI for the executor or the specified target.
/wcstonecutter [target]: Opens the stonecutter GUI for the executor or the specified target.
/wcloom [target]: Opens the loom GUI for the executor or the specified target.
/wccartography [target]: Opens the cartography table GUI for the executor or the specified target.
/wcfurnace [target]: Opens the furnace GUI for the executor or the specified target.
/wcblastfurnace [target]: Opens the blast furnace GUI for the executor or the specified target.
/wcsmoker [target]: Opens the smoker GUI for the executor or the specified target.
/wcsmithing [target]: Opens the smithing table GUI for the executor or the specified target.
/wcanvil [target]: Opens the anvil GUI for the executor or the specified target.
/wcenchant [target]: Opens the enchanting table GUI for the executor or the specified target.
/wcgrindstone [target]: Opens the grindstone GUI for the executor or the specified target.
/wcbrew [target]: Opens the brewing stand GUI for the executor or the specified target.
Player Permissions
Permissions given to every player
wc.craft: Allows the player to use /wccraft.
wc.stonecutter: Allows the player to use /wcstonecutter.
wc.loom: Allows the player to use /wcloom.
wc.cartography: Allows the player to use /wccartography.
wc.furnace: Allows the player to use /wcfurnace.
wc.blastfurnace: Allows the player to use /wcblastfurnace.
wc.smoker: Allows the player to use /wcsmoker.
wc.smithing: Allows the player to use /wcsmithing.
wc.anvil: Allows the player to use /wcanvil.
wc.enchant: Allows the player to use /wcenchant.
wc.grindstone: Allows the player to use /wcgrindstone.
wc.brew: Allows the player to use /wcbrew.
Operator Permissions
Permissions given to every operator
wc.reload: Allows players to use /wcreload.
wc.craft.other: Allows the player to use /craft [target].
wc.stonecutter.other: Allows the player to use /stonecutter [target].
wc.loom.other: Allows the player to use /loom [target].
wc.cartography.other: Allows the player to use /cartography [target].
wc.furnace.other: Allows the player to use /furnace [target].
wc.blastfurnace.other: Allows the player to use /blastfurnace [target].
wc.smoker.other: Allows the player to use /smoker [target].
wc.smithing.other: Allows the player to use /smithing [target].
wc.anvil.other: Allows the player to use /anvil [target].
wc.enchant.other: Allows the player to use /enchant [target].
wc.grindstone.other: Allows the player to use /grindstone [target].
wc.brew.other: Allows the player to use /brew [target].
评论 0
登录后参与评分
还没有评论,来抢沙发吧