FallingTree

FallingTree

28M Downloads

Player command to enable / disable / toggle the mod per-player

unilock opened this issue ยท 7 comments

commented

Describe the feature

Currently I run a Bukkit server with SmoothTimber, a plugin. Sometimes players don't want to risk destroying their wood-based homes, so they'd rather turn the plugin off completely rather than only when they're sneaking or not. With SmoothTimber, this is done with a command, /sm toggle. It's self-explanatory, I think.

I'm in the process of migrating to a Fabric-based server, but unfortunately haven't been able to find a tree-felling plugin with a similar feature. Would it be possible to implement a similar command for players to use to toggle the mod for themselves?

(SmoothTimber also lets you toggle the tree felling functionality for a specific amount of time, which I imagine would be useful if you were to go out to collect wood, but don't want to have to remember to toggle the mod back off. Maybe this could be implemented, too?)

I suppose this can technically be done by setting allowedTags in the config and adding / removing a specified tag to/from a given player, but I'm not sure how to do that in a user-friendly way (or, um, at all).

commented

Player tags can be done rather easily (/player tag add if I recall correctly). Though that is an OP command I'd guess.

Adding a command I'll have to see if that's possible. As I don't really want to add a state to the app (like a storage for all disabled players). So it may use the tag feature under the hood.
Will check if a command can be made server-side only first; if it's not possible then it's a no.

In the meantime can probably provide some command blocks in a common area to add/remove player tag. Though I agree it isn't optimal.

commented

Actually from the wiki it's /tag <target> add/remove <name>.

commented

Seems doable. However I'll probably add it to the upcoming 1.19.3 and next versions, not 1.19.2.

I don't really know which version you plan to use.

commented

I'll have to update to 1.19.3 eventually anyway, so whatever's easier!
Thanks so much!

commented

You can try with this build on 1.19.3-RC3 see if it matches your needs.
I tried it quickly and seems to work. One thing I haven't tried is to have the mod only server side.

(/fallingtree toggle)
https://github.com/Rakambda/FallingTree/actions/runs/3632016382 (artifacts section, mod will be inside the zip file).

commented

Works great! Tested with a Fabric 0.14.11 server and a vanilla client.
(other than the lack of translated toggle notifications, of course)

Thanks again, guess I'll close this :)

commented

Right I forgot the messages haha, will add them for the 1.19.3 release when it comes out.