Sponge
Sponge copied to clipboard
Invalid selectors on wrapped Vanilla commands give an exception
I am currently running
- SpongeVanilla version: 1.1.2-7.2.0
- Java version: openjdk version "1.8.0_171"
- Operating System: Windows 10 Education (Version 1903)
- Plugins/Mods:
- Minecraft
- Mod Coder Pack
- SpongeAPI
- Sponge
- SpongeVanilla
Issue Description
Certain vanilla (minecraft:
) commands, when run with an invalid selector, give a net.minecraft.command.CommandException: commands.generic.selector_argument
exception.
Here are a few that I tried which caused the exception:
-
/tp @e[limit=1] @s
-
/execute @e[limit=1] ~ ~ ~ say Test
-
/spawnpoint @a[limit=1] ~ ~ ~
-
/msg @a[invalid] Blah
Within commands, however, the invalid selectors give the expected output from the game (Invalid selector argument: xyz
)
The full exception of one such command is below:
[22:22:42 ERROR] [Sponge]: Error occurred while executing command 'spawnpoint @a[limit=1] ~ ~ ~' for source EntityPlayerMP['techkid6'/1723, l='world', x=-185.04, y=66.00, z=236.26]: net.minecraft.command.CommandException: commands.generic.selector_argument
java.lang.RuntimeException: net.minecraft.command.CommandException: commands.generic.selector_argument
at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:114) ~[MinecraftCommandWrapper.class:1.12.2-7.2.0]
at org.spongepowered.common.command.SpongeCommandDispatcher.process(SpongeCommandDispatcher.java:355) ~[SpongeCommandDispatcher.class:1.12.2-7.2.0]
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:360) ~[SpongeCommandManager.class:1.12.2-7.2.0]
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:665) ~[dh.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(SourceFile:855) ~[pa.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(SourceFile:842) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) ~[la.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) ~[la.class:?]
at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:219) ~[PacketPhaseUtil.class:1.12.2-7.2.0]
at net.minecraft.network.PacketThreadUtil$1.redirect$zkm000$impl$redirectToPhaseTracker(SourceFile:540) ~[hv$1.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_241]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_241]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:308) ~[SpongeImplHooks.class:1.12.2-7.2.0]
at net.minecraft.server.MinecraftServer.redirect$zja000$onRun(SourceFile:4842) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:3090) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:349) ~[nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:560) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:464) ~[MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: net.minecraft.command.CommandException: commands.generic.selector_argument
Tracing back, it looks like that exception is re-thrown here