本插件为告示牌添加了右键点击时的动作。
你可以添加任意数量的命令,这些命令将在右键点击告示牌时执行。这些命令将在你指定的位置执行!你还可以设置使用该告示牌所需的权限。你也可以为玩家授予临时权限以执行这些命令。从 Beta-0.4 版本开始,你可以使用经济系统来对使用告示牌收费。
Beta-0.3:按钮也可以作为命令告示牌 ;-)
Beta-0.3.1:你还可以将压力板(ID 70 和 72)设置为命令告示牌。要激活它,只需踩上去即可。
在 Beta-0.3 及更高版本中,你需要安装 SQLibrary!!
安装插件(Beta-0.3 及以上版本)
- 下载本插件的最新版本以及 SQLibrary 的最新版本。不要忘记这一步!
- (Beta-0.4 +) 如果你打算使用经济功能,你的服务器上应已安装 Vault。
- 将这些文件放入你的 Plugins 文件夹中。如果是升级,可能需要删除配置文件以获取新的条目。
- 启动你的服务器。
- (Beta-0.4 +) 如果你不使用经济功能,请进入插件的配置文件,将 useEconomy 的值设置为 false,然后重载服务器。
使用方法令告示牌
如果是告示牌,直接右键点击它(如果在配置中启用,左键点击也可)。
如果是按钮,通过右键点击来切换按钮状态(以便与红石输出一起使用)。如果在配置中启用,你可以左键点击来在不产生红石信号的情况下使用它。(在我看来,Minecraft 仅使用右键点击来激活按钮。)
如果是压力板,站在上面即可。(无需点击)。
在某些情况下,右键点击可能无效,因为你手中拿着无法放置在该位置的方块。为了获得最佳效果,请使用工具
创建命令告示牌
要创建命令告示牌,你必须先放置一个告示牌。然后输入 "/ecs create" 并右键点击该告示牌,将其注册到 ECS 数据库中。
如果使用压力板,请点击它。站在上面仅用于激活压力板。
添加命令
输入 "/ecs addcommand <Your command here>" 以添加命令。如果它是命令,必须输入前导斜杠。否则玩家会将其作为聊天消息发送。
"/ecs addcommand time set 0" -> 玩家在右键点击时发送消息 "time set 0"。
"/ecs addcommand /time set 0" -> 玩家在右键点击时执行命令 "/time set 0"。
模板
可以使用模板 "%player%"。如果将其添加到你的命令中,它将被执行者的玩家名称替换。
"/ecs addcommand Player %player% just used the sign!" -> 玩家 "John_Doe" 发送消息 "Player John_Doe just used the sign!"
添加临时权限
输入 "/ecs addperm <Your permission here>" 以向玩家添加临时权限。这些临时权限允许玩家执行他们通常无权执行的命令。这些权限在执行命令的过程结束后被撤销。
修改命令/权限
输入 "/ecs modcommand" 或 "/ecs modperm",然后输入命令/权限的索引号,接着输入要替换的值。索引号可以通过告示牌上的 "/ecs info" 命令获取。它是每个条目前面的数字。
示例:你想将权限编号 4 修改为 "john.doe" => "/ecs modperm 4 john.doe"
移除命令/权限
输入 "/ecs remcommand" 或 "/ecs remperm",然后输入命令/权限的索引号。
示例:你想移除命令编号 2 => "/ecs remcommand 2"
设置使用此告示牌所需权限
输入 "/ecs setperm <Your permission here>" 以设置所需权限。玩家若想使用此告示牌,必须具备此权限。
设置插件执行的位置
首先移动到命令应执行的位置。然后输入 "/ecs setloc" 并右键点击你的告示牌。这支持多世界兼容。
将告示牌设置为仅限 OP 使用
输入 "/ecs setop <true | false>" 然后右键点击告示牌。
获取任何命令告示牌的信息
输入 "/ecs info" 并右键点击告示牌。
移除告示牌
输入 "/ecs remove" 并右键点击一个命令告示牌。
命令
- /ecs create - 权限: ecs.admin - 创建新告示牌
- /ecs addcommand [可选: "id <value>"] <command> - 权限: ecs.admin - 添加命令
- /ecs addperm [可选: "id <value>"] <permission> - 权限: ecs.admin - 添加临时权限
- /ecs modcommand [可选: "id <value>"] <index> <newcommand> - 权限: ecs.admin - 修改命令(索引在 "/ecs info" 中可见)
- /ecs modperm [可选: "id <value>"] <index> <newpermission> - 权限: ecs.admin - 修改权限
- /ecs remcommand [可选: "id <value>"] <index> - 权限: ecs.admin - 移除命令
- /ecs remperm [可选: "id <value>"] <index> - 权限: ecs.admin - 移除权限
- /ecs setperm [可选: "id <value>"] <permission> - 权限: ecs.admin - 设置所需权限。默认为 ecs.use
- /ecs setloc [可选: "id <value>" "none"] - 权限: ecs.admin - 设置/移除 ("none") 命令执行的位置
- /ecs setop [可选:"id <value>"] <true | false> - 权限:ecs.admin - 将此告示牌设置为仅管理员可操作
- /ecs info - 权限:ecs.info - 获取此告示牌的信息
- /ecs remove [可选:"id <value>"] - 权限:ecs.admin - 移除此告示牌
- /ecs reload - 权限:ecs.reload - 重新加载插件数据库
Beta 0.4 +:
- /ecs seteconomy [可选:"id <value>"] <None|Check|Withdraw|Give> <Value> - 权限:ecs.admin - 设置经济状态。请避免使用负值。
除了每次右键点击告示牌外,你还可以在命令和参数之间放置 "id <Sign-id>"。
示例:/ecs addcommand id 2 /time set 0 - 这会将命令 "/time set 0" 添加到 ID 为 2 的告示牌上。ID 可以在告示牌的信息中看到。
配置文件
- leftclick: (默认:true) - 你可以选择仅使用右键点击,还是同时支持左键和右键点击(true:左键和右键均可;false:仅右键)。
- useEconomy: (默认:false) - 启用经济功能。(该功能可能存在缺陷。)
- silentexecute: (默认:false) - 静默执行模式(尚未完全实现)。
- debugMessages: (默认:false) - 切换日志刷屏
计划中的升级
- 经济支持(检查是否有指定金额可用 / 使用时收费)- 已开始开发并上传 - 需要测试者!
- 以 OP 身份运行命令
- 向玩家发送消息
- 添加防止执行命令的插件向玩家发送消息的功能(我还不知道如何实现)。
- 添加更多模板……(优先级较低,如果有人需要更多模板,请给我发私信,我会优先为你编写)
已知问题(与其他插件的冲突)
- iSafe:黑名单上的命令不会执行。(这实际上不算问题 ;-))
- 版本 0.3b:由于 sqlibrary 未列入依赖项列表,导致告示牌未能正确加载 - 已在 0.4 版本中修复
特别感谢:
关于测试阶段的信息
本插件仍处于测试阶段,因此可能会出现阻碍服务器某些功能或对其他方面产生负面影响的错误。我将尽快修复这些错误。因此,在短时间内可能会有多次更新。
GitHub 上的本项目 - 在这里你可以获取最新版本(开发构建版)。如果你使用该源码,你将最先获得 bug 修复,但也可能最先遇到新的 bug。
欢迎提供反馈 / 提交包含建议和问题的工单。
This Plugin adds actions for rightclicking on your signs.
You can add an arbitrary number of Commands which will be executed by right-clicking the Sign. These Commands will be executed on a location defined by you! You also have the opportunity to set the needed permission to use the sign. You can also give temporary permissions to a player for executing the commands. As of Version Beta-0.4 you can use Economy to charge for using a sign.
Beta-0.3: Buttons can also be CommandSigns ;-)
Beta-0.3.1: You can also set a pressureplate (id 70 and 72) as CommandSign. To activate it, walk on it.
In Version Beta-0.3 and above you'll need the SQLibrary!!
Installing the Plugin (Beta-0.3 and above)
- Download the latest Version of this plugin AND of the SQLibrary. Do not forget this Step!
- (Beta-0.4 +) If you want to use economy you should have Vault installed on your server.
- Drop these files in your Plugins folder. Maybe you have to delete the config file to get the new entries, if you are upgrading.
- Start your server.
- (Beta-0.4 +) If you are not using economy, go into the plugin's Config file, set the useEconomy-value to false and reload the server.
Using a CommandSign
If it is a sign, just rightclick it (leftclick too if activated in config).
If it is a Button, toggle the Button by rightclick (to use it with the redstone output together). If activated in config, you can do a leftclick to use it without the redstone current (In my Opinion Minecraft uses only rightclicks to activate buttons).
If it is a Pressure Plate, place yourself on it. (No Clicking).
In some cases rightclicks doesn't work, because you have a block in your hand, which cannot be placed there. For Best Results Use A Tool
Creating a CommandSign
To create a CommandSign you must first place a Sign. Then you type "/ecs create" and rightclick the Sign to register this Sign in ECS's Database.
If you use a pressure plate please click too. Moving on it is only for Using the plate.
Adding Commands
Type "/ecs addcommand <Your command here>" to add a command. You must type the leading slash if it is an command. Otherwise the player would chat.
"/ecs addcommand time set 0" -> The Player sends the Message "time set 0" on rightclicking.
"/ecs addcommand /time set 0" -> The Player executes the command "/time set 0" on rightclicking.
Templates
It is possible to use the template "%player%". If you add it to your command it will be replaced by the executings' player name.
"/ecs addcommand Player %player% just used the sign!" -> The Player "John_Doe" sends the Message "Player John_Doe just used the sign!"
Adding temporary Permissions
Type "/ecs addperm <Your permission here>" to add temporary permissions to the player. These temporary permissions allow the player to execute commands which they normally are not allowed to. The permissions are revoked after the command executung process.
Modify a Command/Permission
Type "/ecs modcommand" or "/ecs modperm" then enter the Index of the command/permission and then the value to replace. The index can be received by the "/ecs info" - command on the sign. It's the leading number of each entry.
example: You want to modify the Permission number 4 to "john.doe" => "/ecs modperm 4 john.doe"
Remove a Command/Permission
Type "/ecs remcommand" or "/ecs remperm" then enter the Index of the command/permission.
example: You want to remove the Command number 2 => "/ecs remcommand 2"
Set the required permission to use this Sign
Type "/ecs setperm <Your permission here>" to set the required permission. The player must have this permission if he wants to use this sign.
Set the position where the plugins are executed
First move to the location where the commands should be executed. Then type "/ecs setloc" and right-click your sign. This is multiworld compatible.
Set the Sign to OP-only
Type "/ecs setop <true | false>" and then right click the sign.
Get Info about any CommandSign
Type "/ecs info" and rightclick the Sign.
Remove a Sign
Type "/ecs remove" and rightclick a CommandSign.
Commands
- /ecs create - Perm: ecs.admin - Creates a new Sign
- /ecs addcommand [optional: "id <value>"] <command> - Perm: ecs.admin - Adds a command
- /ecs addperm [optional: "id <value>"] <permission> - Perm: ecs.admin - Adds a temporary permission
- /ecs modcommand [optional: "id <value>"] <index> <newcommand> - Perm: ecs.admin - Modifies a command (index is visible in "/ecs info")
- /ecs modperm [optional: "id <value>"] <index> <newpermission> - Perm: ecs.admin - Modifies a permission
- /ecs remcommand [optional: "id <value>"] <index> - Perm: ecs.admin - Removes a command
- /ecs remperm [optional: "id <value>"] <index> - Perm: ecs.admin - Removes a command
- /ecs setperm [optional: "id <value>"] <permission> - Perm: ecs.admin - Sets the required permission. Default is ecs.use
- /ecs setloc [optional: "id <value>" "none"] - Perm: ecs.admin - Sets/removes ("none") the location of the commands execute
- /ecs setop [optional: "id <value>"] <true | false> - Perm: ecs.admin - Sets this sign op-only
- /ecs info - Perm: ecs.info - Gets info about this sign
- /ecs remove [optional: "id <value>"] - Perm: ecs.admin - removes this sign
- /ecs reload - Perm: ecs.reload - Reloads the plugins database
Beta 0.4 +:
- /ecs seteconomy [optional: "id <value>"] <None|Check|Withdraw|Give> <Value> - Perm: ecs.admin - Sets the economy status. Please avoid negative values.
Instead of rightclicking the sign everytime you can place a "id <Sign-id>" between the command and the argument.
example: /ecs addcommand id 2 /time set 0 - this adds the command "/time set 0" to the sign with id 2. The id can be seen in the info of the sign.
Config-File
- leftclick: (default: true) - you can say whether you use only rightclicks, or leftclicks too (true: left AND rightclicking, false: only rightclicking).
- useEconomy: (default: false) - make use of economy features. (Features may be buggy).
- silentexecute: (default: false) - not fully implemented silent mode.
- debugMessages: (default: false) - toggle log spamming
Intended Upgrades
- Economy Support (check if a specified amount of money is available / charge money for use) - started, uploaded - need testers!
- Run Commands as Op
- Send the player a message
- Add the ability to prevent the command-executing plugins to send the player messages (i don't know how).
- Adding more Templates.... (less priority, if someone needs more Templates, send me a PM, i'll code that first then)
Known Problems (with other plugins)
- iSafe: Commands on a blacklist are not executed. (Not actually a problem ;-))
- Version 0.3b: Signs are not loaded properly because the sqlibrary was not in the dependency list - was fixed in 0.4
Special Thanks to:
Information about the beta stage
This plugin is still in beta-stage so there can occur bugs which block some funtions of the server or influence the server in other negative ways. I will fix the bugs as fast as i can. Therefore there can be many updates in a short time period.
This Project on GitHub - Here you can get the newest of the newest version (dev builds). If you use this source you are the first one to get the buxfixes but also the first one to get probably new bugs.
Feel free to give me a feedback / send a ticket with suggestions and problems.
评论 0
登录后参与评分
还没有评论,来抢沙发吧