Spice of Life: Carrot Edition

Spice of Life: Carrot Edition

57M Downloads

Can't use /foodlist clear on yourself if not opped

jinkhya opened this issue · 6 comments

commented

Hello, I dunno if that's intended but you can't clear your foodlist if not opped. The message tells you you can't apply the command to other players even though I specified my own name.
It'd be cool to be able to do it yourself without having to ask admins on a server when you've played a pack and want to restart.
Thanks in advance.
Jin

commented

Hmm, does it work if you just don't specify a player at all? Just running /foodlist clear with no arguments.

commented

It doesn't either, /foodlist clear gives the same error message "you do not have the permissions necessary to apply this command to other players"

commented

Wait, I think I know what's going wrong… Is it possible you can clear other players' lists but not your own? I think I inverted a check lmao

if (!isOp && isTargetingSelf)
throw new CommandException(localizedComponent("no_permissions"));

commented

Can you try if it's still wrong with this version? You'll have to put it on the server (the client shouldn't matter).

SoL-Carrot-1.16.5-1.10.1.jar.zip

commented

That fixed it thank you ! :D

commented

Glad to hear it! Will upload the update to CurseForge now.