This is very odd behaviour that led to an oversight in a command in our main plugin:
playerAction {
// do something
}
val offlinePlayer by offlinePlayerArg { default = sender as? Player }
action {
// do something involving another player, but not AS that player
}
If players have the .other permission it seems BOTH actions get executed which is unexpected.
Proposed solution
- I personally expected only one block to fire, seeing as we use brigadier under the hood it might not be super easy to change this, but should be investigated since it would prevent such an edge case
- Stop providing the default .other and instead provide a helper for it that is more explicit. Ex. something with an argument that defaults to current player. We could still likely run into this problem with optional arguments however since they abstract away all the execute blocks.