FlashyReese / CommandAliases

Alternate short commands for complex commands
MIT License
25 stars 6 forks source link

Could not find existing command #63

Closed asundrus closed 3 months ago

asundrus commented 3 months ago

Hi.

I just tested this on one of my servers running the latest Fabric, I tested this command:

{ "schemaVersion": 1, "commandMode": "COMMAND_REDIRECT_NOARG", "command": "survival", "redirectTo": "gamemode survival" }

It throws this error in the console after Reload:

[15:42:59] [Server thread/ERROR]: [SERVER] COMMAND_REDIRECT - Could not find existing command "gamemode survival": D:_server\MC_Fabric.\config\commandaliases\survival.json

Am I missing something?

FlashyReese commented 3 months ago

The gamemode command was changed in 1.19.3 internally. You can no longer using redirect for it, but you can achieve the same thing with

{
  "schemaVersion": 1,
  "command": "survival",
  "commandMode": "COMMAND_CUSTOM",
  "actions": [
    {
      "command": "gamemode survival $executor_name()",
      "commandType": "SERVER"
    }
  ]
}
asundrus commented 3 months ago

The gamemode command was changed in 1.19.3 internally. You can no longer using redirect for it, but you can achieve the same thing with

{
  "schemaVersion": 1,
  "command": "survival",
  "commandMode": "COMMAND_CUSTOM",
  "actions": [
    {
      "command": "gamemode survival $executor_name()",
      "commandType": "SERVER"
    }
  ]
}

I see, thanks, maybe I missed that in the Wiki.