TwitchSpawn

TwitchSpawn

411k Downloads

Unknown command

davidjimeneztv opened this issue · 3 comments

commented

Describe the bug
After configuring the mod on a 1.18.2 server, when an event like Twitch Follow plays, it returns two messages in the chat that say "Unknown command".

To Reproduce
Steps to reproduce the behavior:

  1. Join a server 1.18.2 with TwitchSpawn inside the folder "mods" of the server and client.

  2. Place a EXECUTE rule for Twitch Follow:
    EXECUTE %/tnt 1 0.1 4 (replace with mc username)%
    ON Twitch Follow

  3. See error

Expected behavior
I suspect that it is because the commands must be entered in the console without / and the mod requires placing the /, therefore it is executed:
//tnt...

Version (please complete the following information):

  • OS:
    • Client: Windows 11 24H2
    • Server: Ubuntu aarch64
  • TwitchSpawn Version: 1.9.3
  • Forge Version: 40.2.21
commented

I think I detected the problem, //tnt is not executed, it is that it is not executed directly because the mod is not capable of executing plugin commands on a hybrid server.

commented

If the command is part of a mod you can use
EXECUTE %/modname:tnt 1 0.1 4 (replace with mc username)%
Not sure how it would work if it's part of a plugin

If you're wanting to spawn in tnt you can use
EXECUTE %/summon tnt ~ ~ ~ {Fuse:60}%

commented

Hey there!

Unfortunately some of the mods/plugins implement their client-only commands as something that is not defined under Minecraft's command definiton. TwitchSpawn is unable to perform EXECUTE with something that is not executable by the Minecraft Command Dispatcher. 😢 (Checkout the implementation)

TwitchSpawn.SERVER.execute(() -> {
int result = TwitchSpawn.SERVER
.getCommands()
.performCommand(source, replaceExpressions(command, args));


Though, I think I shall come up with an action that is able to mimic writing something on the actual client-side chat input. Maybe something like CLIENT_CHAT %Message here%. I'll consider that for TSL1.0

In the meantime, as a workaround, you can use the vanilla command to summon a TNT entity.
I think @shadowcryptic's suggestion shall work as expected:

If you're wanting to spawn in tnt you can use
EXECUTE %/summon tnt ~ ~ ~ {Fuse:60}%

Sorry for the inconvenience!