软盘君
本站的沙雕站长,半吊子运维
Floppy β Studio

Minecraft Java版服务器使用指令时无法使用选择器

软盘君在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的东西

本文章(Minecraft Java版服务器使用指令时无法使用选择器)使用CC BY-SA 3.0进行许可,转载请注明出处:https://www.iruanp.com/archives/996 如果你认为我们的文章对您有帮助,请在Youtube订阅软盘君的频道
# # #
首页      游戏      Minecraft      Minecraft Java版服务器使用指令时无法使用选择器

Floppy

文章作者

啥都折腾但啥都折腾不好的开发者。

发表回复

textsms
account_circle
email

16 + 1 =

Floppy β Studio

Minecraft Java版服务器使用指令时无法使用选择器
软盘君在MaxCraft中要使用到命令方块处理一些事情,但是发现不能使用选择器(@p、@a之类的)。 在百度知道上看到一个回答说要在前面加上minecraft,比如@p要写成minecraft:@p,我试了一…
扫描二维码继续阅读
2022-04-17