OP: does not apply to multiple commands
SlimeDog opened this issue ยท 6 comments
Describe the bug
op: applies only to the first command in a multiple-command invocation. For example:
command: op:stats ${player.name} DEATHS ++1 ; mvtp ${player.name} e:world_void:0.5,64,0.1:0:0
fails if the player does not have mvtp permissions, because op: applies only to the first (stats) command. But:
command: op:stats ${player.name} DEATHS ++1 ; op:mvtp ${player.name} e:world_void:0.5,64,0.1:0:0
fails as an illegal command.
VoidSpawn Version: 1.18.3
Spigot Version: 1.15.2 (Jenkins 2686)
Please consider alternative, standard YAML, syntax. For example (based on the above)
command:
- op:stats ${player.name} DEATHS ++1
- op:mvtp ${player.name} e:world_void:0.5,64,0.1:0:0
I will try to find some time for this today. I quickly scanned through the code and I couldn't see a logic error. So will need to look into this further.
Thanks. I'm pretty confident. If a player has op permissions (or the required permissions), all commands are executed. Otherwise, only the first (op:) command is executed.
I found the problem. Looks like it is the space wrapping around the semi-colon that is causing the problem. This should work with the current version:
op:stats ${player.name} DEATHS ++1;op:mvtp ${player.name} e:world_void:0.5,64,0.1:0:0
I will put together a patch though so this doesn't cause a problem.