Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/ctellraw selectors aren't fully functional #696

Open
RealRTTV opened this issue Dec 16, 2024 · 5 comments
Open

/ctellraw selectors aren't fully functional #696

RealRTTV opened this issue Dec 16, 2024 · 5 comments

Comments

@RealRTTV
Copy link
Contributor

RealRTTV commented Dec 16, 2024

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.

image

@xpple
Copy link
Collaborator

xpple commented Dec 16, 2024

This is likely an issue with clientarguments.

@RealRTTV
Copy link
Contributor Author

I will close and reopen it there tonight

@xpple
Copy link
Collaborator

xpple commented Dec 16, 2024

Perhaps it's a good idea to verify that is the case first, do you have a log you can share?

@RealRTTV
Copy link
Contributor Author

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:?]```

@Earthcomputer
Copy link
Owner

Looks like it's in clientcommands. Probably FakeCommandSource needs some more overrides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants