clientcommands
clientcommands copied to clipboard
/ctellraw selectors aren't fully functional
When using /ctellraw, selectors don't work properly in most cases.
For example, if I perform /ctellraw {"translate":"death.fell.accident.generic","with":[{"selector":"@s"}]} I will get RTTV fell from a high place with the correct selector tag.
However if I try /ctellraw {"translate":"death.fell.accident.generic","with":[{"selector":"RTTV"}]} I will get a NullPointerException that net.minecraft.server.MinecraftServer.getPlayerList() cannot be invoked because net.minecraft.commands.CommandSourceStack.getServer() is null.
This is likely an issue with clientarguments.
I will close and reopen it there tonight
Perhaps it's a good idea to verify that is the case first, do you have a log you can share?
java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.method_3760()" because the return value of "net.minecraft.class_2168.method_9211()" is null
at knot/net.minecraft.class_2300.method_9813(class_2300.java:200) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_2300.method_9816(class_2300.java:120) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_2579.method_10890(class_2579.java:39) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_2564.method_10881(class_2564.java:50) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_2588.method_10890(class_2588.java:215) ~[client-intermediary.jar:?]
at knot/net.minecraft.class_2564.method_10881(class_2564.java:50) ~[client-intermediary.jar:?]
at knot/net.earthcomputer.clientcommands.command.CTellRawCommand.lambda$register$0(CTellRawCommand.java:19) ~[clientcommands-2.9.9.jar:?]
at knot/com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
at knot/com.mojang.brigadier.context.ContextChain.executeAll(ContextChain.java:88) ~[brigadier-1.3.10.jar:?]
at knot/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:228) ~[brigadier-1.3.10.jar:?]
at knot/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:179) ~[brigadier-1.3.10.jar:?]
at knot/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:144) ~[brigadier-1.3.10.jar:?]
at knot/net.fabricmc.fabric.impl.command.client.ClientCommandInternals.executeCommand(ClientCommandInternals.java:86) ~[fabric-command-api-v2-2.2.40+e496eb1504-a46f392de5bcfb56.jar:?]```
Looks like it's in clientcommands. Probably FakeCommandSource needs some more overrides