So I've been building a large battle arena type server where there is both PVP and PVE survival in a concentrated coliseum, and most of the map is governed via command blocks.
Score is measured at the end of a life by amount of xp gained while alive. To prevent looting of player corpses or loss of items, I recently turned the gamerule keepInventory
on, but because keepInventory also lets the player keep their xp on death, it does not automatically reset them to zero anymore.
So I set up a small command block clock-chain under spawn that's supposed to test for any player in spawn with 1 or more levels, and then remove 1 level per tick until they reach zero. Currently the /testfor
clock works flawlessly, but when I attempt to chain a block with the command:
/xp @a[-1,230,-11,5,m=0,lm=1] -1L
It reports that @a[-1,230,-11,5,m=0,lm=1]
is invalid, so I tried shortening it to @a, and then @p. Still no dice. It seems the only way I know of that can get the /xp
command to work is by specifically naming the player to target, which is useless for a public server spawn when I need it to target multiple random players at once.
Can anyone offer any tips to help me solve this delemma?