Spice of Life: Carrot Edition

Spice of Life: Carrot Edition

55M Downloads

Rework Commands

juliand665 opened this issue · 15 comments

commented

Now that we have the food book, most players shouldn't really need to use commands anymore, so we may as well focus entirely on the admin side, make them op-exclusive, and take a player as argument. That way, admins have full control over people's progress, both read and write.

commented

I was just going to create a bug report for this . . .

I'm working on a pack where I need to use Better Questing to OP reset the player's food list and health when they die. But I was having trouble figuring out the right syntax to tell the computer what player to clear.

"/foodlist clear @p" wasn't working and having the quest book run the command without it gave me an error saying I had to specify which player to target. I was going to report it as a huge bug. I actually never even considered that a player would be running the command.

I use it for testing . . . but no player on a server using my pack is going to have OP capacity. If they wanted to restart for some reason they would need to have an admin with OP clearance use the command on them . . . the same way I was having to use the Better Questing mod with OP clearance to run the command whenever a player died.

Of course, if there also was an option in configs to lower or reset the player's health on death by default that would be amazing too. :)

commented

As a workaround, you should just be able to use /execute for now. I'm not sure of the exact syntax in 1.12, but something like /execute @p ~ ~ ~ /foodlist clear should work.

commented

Remembering when a food was last eaten and removing the n longest-uneaten foods upon death would certainly be interesting though!

commented

That was a good idea, and I tried it... then I laughed and laughed.

2019-06-22_02 32 25

2019-06-22_02 33 04

It seems like trying to short cut things this way is exactly the same as having Better Questing do the command with the "via player" option selected.

If I type in "/foodlist clear" myself the command works . . . but if I use Better Questing or the Execute function to do the same thing it comes back with the error "You must specify which player you wish to perform this action on."

If I had to guess I think the "via player" option is either using "/execute" itself, or is doing something very similar.

commented

Sure I'll install it on the pack I'm working on now . . . best case I get to test the play balance on my idea a bit early . . . worst case I send you a crash report. lol

I'm hoping I can use this to make death a bit more painful without making it devastating . . . resetting your hearts to 5 and making you eat to build back up isn't too bad if you have a farm, and unless you want to run in circles forever or constantly damage yourself you aren't going to recover from it super quickly.

commented
commented

Looks like the image you included didn't quite work; i guess that's due to the email thing?

It's very strange that it'd reset your config. Is that from 1.7 to 1.8? Because I didn't change anything about the config system…

I explicitly tested with /foodlist clear @p (also tried again just now) and that seems to work fine on my end. Perhaps the build broke somehow; I'll give you a new one soon.

commented

How about this one?

commented

Ah yeah, I found the issue. Will be fixed in the next build, along with just allowing you to specify a player as argument!

commented

If you're feeling up to it, I'd appreciate a quick beta test of this build I just exported; just to make sure I didn't break anything!

commented

Yup, it's working now. I also figured out the problem with the previous download too and it was user error on my end.

commented

Sounds great! Looks like 1.8.1 is almost ready to go out of beta then :)

commented

All right, this is done in the latest version!

commented

Great work! I just tested the death reset and it worked perfectly. No more clunky methods of detecting when a player dies, no more finding a way to run a command to reset things . . . all I need to do is set it up and let it run. . . and the best part is how quickly you got it done.

I know you mod makers don't get your share of appreciation . . . and I'll be the first one to get in contact with a bug or a feature request . . . so I want to make sure to write something positive here. :)

commented

Thank you! I think I speak for all modders when I say that making people happy with what I create is one of the best feelings :)