软盘君在MaxCraft中要使用到命令方块处理一些事情,但是发现不能使用选择器(@p、@a之类的)。
在百度知道上看到一个回答说要在前面加上minecraft,比如@p要写成minecraft:@p,我试了一下,它没有工作
B站上很多人发有关影片,连JE还是BE都不写,没有任何有价值的内容。
一气之下用英文搜索,在Github上看到EssentialsX仓库的一个Issue:[1.15.1] EssentialsX’s /give command not working with target selectors · Issue #2941 · EssentialsX/Essentials (github.com)
这段消息值得注意:
In 1.13, Spigot removed its support for vanilla selectors in plugin commands. You can use a plugin like PsudoCommands or CommandHook to restore selector functionality for plugins.
Edit: in EssentialsX loop commands that can run on multiple players, you can use
*
or**
to select all players.
看了一下CommandHook的帖子
FAQ
Q: Vanilla commands are not working.
A: Plugin scans if the command inside the block starts with /minecraft: or minecraft: so the syntax is ex.: minecraft:kill @p[name="RandomPlayer"]
TL;DR: just add minecraft: before it.
我大概就知道百度知道上那位的意思了,他的意思可能是让在指令前添加,因为EssentialsX不能使用目标选择器,所以要用原版的指令,原版的指令默认被EssentialsX替换掉了,所以应该加上一个类似于namespace的东西
发表回复