CBWrapper
概念
你是否曾希望能在命令方块中使用 WorldEdit?或者其他插件的命令,而这些命令通常无法在命令方块中运行。好吧,这个插件就是为你准备的!当从命令方块中执行 /cw 命令时,它会在命令方块所在的位置创建一个虚拟玩家,并执行命令参数中指定的命令!
新闻
一些人(实际上是所有人)在使用 CBW 1.8_alpha、Essentials 以及其他一些插件时遇到了问题。这些冲突是 CBW 1.8_alpha 工作方式带来的副作用,这也是我希望不会发生的情况。Avyge1l 提出了一个解决方案,我现在已经将其实现。该插件现在的工作方式与 1.7 版本几乎完全相同,但它仍然适用于 1.8。
安装
标准的 Bukkit 插件安装;下载 CBWrapper.jar 并将其放入你的 plugins 文件夹中
源代码
| 版本 | 源码链接 |
| 开发版本 | |
| 1.8.3 版本(当前) | |
| 1.8 版本 | |
| 1.8_alpha 版本 | |
用法
如果有任何内容让你感到困惑,你可能需要查阅 此页面,我认为它更友好但清晰度稍差。
请尽可能快地告诉我如何使用这个插件
在你的命令前加上 /cw 并移除第一个斜杠。WorldEdit 命令将保留一个斜杠,而其他命令将没有斜杠。像普通玩家一样使用命令。查看示例以了解复杂操作
这很棒,但没什么实际意义
这就是本节的作用。在这里,我将更详细地解释所有内容
CBWrapper 添加了一个命令,即用于命令方块的 /cw。一般用法如下:
/cw [-u username] [-w world] [ -o x y z] <command> [arguments]
然而,对于许多目的来说,只需
/cw <command> [arguments]
就足够了。
/cw 命令会创建一个假玩家并以该玩家的身份运行命令。这允许你使用通常仅对玩家有效的插件命令。最好的例子就是 WorldEdit。WorldEdit 通常仅供玩家使用,并且不支持命令方块。使用 /cw 命令,你可以欺骗 WorldEdit 使其认为有玩家在使用它,从而允许执行操作。
假设你想要一个命令方块系统,以便在新回合开始时重置 spleef 竞技场。
你可以在每个角落放置一个命令方块来运行 WorldEdit 选择命令 //pos1 和 //pos2,以及另一个
命令方块用雪或你使用的任何其他材料替换空方块。
如果我想让命令方块离得很远怎么办?没问题。使用 -o 选项。-o 原本代表 offset(偏移),但现在作为 -p(位置)更有意义。不过没关系。你提供三个数字,它们将被解释为坐标。以 ~ 开头的数字将被解释为相对坐标,因此 -o 5 ~0 -4 表示在 X 坐标 5 处运行命令,使用命令方块的 Y 坐标,以及 Z 坐标 -4。
如何在不同世界中选择区域?
使用 -w 世界选项。它需要一个参数:要在其中运行命令的世界名称。通常是 "world"、"world_nether" 或 "world_the_end"。如果你安装了 Multiverse 或其他类似插件,多世界世界的名称也应该可以工作。-w 选项最好与 -o 一起使用,否则你的命令将在相同的位置运行,但在你指定的下界或其他世界中。
那很好,但我如何防止我的选择发生碰撞?
使用 -u 选项假装成不同的玩家。它需要一个参数:它假装拥有的用户名。WorldEdit 认为这是不同的玩家,但实际上没有任何玩家。这只是命令方块。
示例
选择 WorldEdit 选择的角 1:/cw /pos1
选择 WorldEdit 选择的角 2:/cw /pos2
替换选择中的方块:/cw /replace air snow
确保不要使用 /set 或 /wall,因为它们可能会删除你的命令方块!
禁止任何胆敢靠近命令方块的人,并假装是其他人做的:/cw -u @r ban @p
选择命令方块上方 2 个方块的角 /cw -o ~0 ~2 ~0 /pos1
选择下界中的坐标 (0, 0, 0):/cw -w world_nether -o 0 0 0 /pos1
停止服务器:/cw stop
救命,我还是不明白!
在下面留下评论。发布你尝试过的命令、你想要做的事情以及你认为有帮助的任何其他信息。
注意 wiki 格式,它可能会弄乱内容。通常将 {{{ 和 }}} 放在你的命令周围会有所帮助
权限
只有一个权限节点,“cbwrapper.cb”,用于 /cw 命令
其他说明
- 默认情况下,虚拟玩家的用户名是 "@"
- 除非使用 -o 标志,否则虚拟玩家的位置是其运行的命令方块的位置
- 假人玩家实际上并未注册为真正的玩家,因此无法将他人传送至该假人或执行类似操作。
- 假人玩家拥有全部权限的 OP(管理员)身份。唯一的安全保障在于:假人玩家仅能通过命令方块创建,而命令方块只能由创造模式下的 OP 进行编辑。
如果您在本页面以外的地方留言,我可能至少几个月后才看到。私信也是可以的。
CBWrapper
Concept
Have you ever wanted to be able to use WorldEdit from command blocks? Or other plugins, too, whose commands won't work from command blocks. Well, this is the plugin for you! When the command /cw is run from a command block, it will create a dummy player where the command block is and run the command specified in the command parameters!
News
Some people (everybody) were getting issues between CBW 1.8_alpha, Essentials, and a few other plugins. These conflicts are a side effect of how CBW 1.8_alpha works and is what I hoped wouldn't happen. Avyge1l came up with a solution, which I have now implemented. The plugin now works almost exactly the same way it did in 1.7, but it works for 1.8 still.
Installation
Standard bukkit plugin installation; download the CBWrapper.jar and stick it in your plugins folder
Source Code
| Version | Source Link |
| Development Version | |
| Version 1.8.3 (current) | |
| Version 1.8 | |
| Version 1.8_alpha | |
Usage
If anything doesn't make sense, you might want to consult this page, which I think is a bit more friendly but less clear.
Just tell me how to use the plugin as fast as you can
Put /cw in front of your commands and remove the first slash. WorldEdit commands will have one slash left and other commands will have no slashes left. Use commands just like you would as a player. Look at the examples for complicated things
That was great but didn't make much sense
That's what this section is for. Here I'll explain everything in more detail
CBWrapper adds one command, /cw for use in command blocks. The general usage is as follows:
/cw [-u username] [-w world] [ -o x y z] <command> [arguments]
For many purposes, however, simply
/cw <command> [arguments]
is sufficient.
The /cw command create a fake player and runs the command as it. This allows you to use commands from plugins that would usually only work for players. The best example of this would be WorldEdit. WorldEdit is usually meant for only players to use, and has no support for command blocks. Using the /cw command, you can trick WorldEdit into thinking that a player is using it and allow the operation.
Say you wanted a command block system to reset a spleef arena every time a new round starts.
You could put a command block at each corner to run the WorldEdit selection commands //pos1 and //pos2 and another
command block to replace the empty blocks with snow or whatever material you are using.
What if I want to have the command blocks far away? No problem. Use the -o option. -o originally stood for offset, but now it would make more sense as -p for position. Oh well. You give it 3 numbers, which are interpreted as coordinates. And numbers starting with a ~ will be interpreted as relative, so -o 5 ~0 -4 would mean run the command at X coordinate 5, use the command block's Y coordinate, and Z coordinate -4.
How about selecting regions in different worlds?
Use the -w for world option. It takes one parameter: the name of the world to run the command in. Usually this would be "world", "world_nether", or "world_the_end." If you have Multiverse or something installed, the name of the multiverse world should work too. The -w option is best used with -o, because otherwise your command will be run in the same position, but in the nether or whatever world you specify.
That's great, but how can I prevent my selections from colliding?
Pretend to be different players with the -u option. It takes one parameter: the username it pretends to have. WorldEdit thinks it's different players, but it actually isn't any players at all. It's just command blocks.
Examples
Select corner 1 of a WorldEdit selection: /cw /pos1
Select corner 2 of a WorldEdit selection: /cw /pos2
Replace blocks in selection: /cw /replace air snow
Make sure you don't use /set or /wall, as those might delete your command blocks!
Ban whoever dares approach the command block and pretend that someone else did it: /cw -u @r ban @p
Select a corner 2 blocks above the command block /cw -o ~0 ~2 ~0 /pos1
Select the coordinates (0, 0, 0) in the nether: /cw -w world_nether -o 0 0 0 /pos1
Stop the server: /cw stop
Help me it still doesn't make sense!
Leave a comment below. Post the commands you tried, what you're trying to do, and anything else you think would be helpful.
Be careful with the wiki formatting, it can mess things up. Usually putting {{{ and }}} around your commands helps
Permissions
There is only one permission node, "cbwrapper.cb", for the /cw command
Other Notes
- The dummy player's username, by default, is "@"
- The dummy player's position is the position of the command block it was run from, unless you use the -o flag
- The dummy players isn't actually registered as a player, so you can't teleport people to it or anything
- The dummy player is an op with all permissions. The only bit of security is that the dummy player is only created by command blocks, which can only be edited by ops in creative mode
If you comment anywhere other than this page, I probably won't see it for at least a few months. PMs are fine, too
评论 0
登录后参与评分
还没有评论,来抢沙发吧