Carpet

Carpet

2M Downloads

[Scarpet Suggestion] Ability to query and maybe modify Carpet settings.

Ghoulboy78 opened this issue ยท 5 comments

commented

Basically anything in CarpetSettings.java. I will probably do this, but I'm kinda busy so I'm putting it here in case I forget or someone else rly wants to do it. Useful for certain applications, like carpets in my implementation of distance command in scarpet, or checking for fillUpdates in draw command.

commented

BTW This would be a (partial) duplicate of #520 since I've just remembered that I made an issue before fixing it.

commented

oh ok thx

commented

back to 69 issues then

commented

Querying carpet rules is already possible since #519 got merged.

You can get them by using system_info('world_carpet_rules') and also __on_carpet_rule_changes(rule, newvalue). Their value is always a string.

Rules from extension's custom SettingManagers are namespaced (extensionid:rule).

About modifying them, I really don't think that an app should be able to modify those, since they could change the commandScriptACE, and just that I don't feel like an app should need to change those, it should be up to the admin/user, and if you really want to, you can always use run().

I did those specifically for those apps, since I saw you were doing one of them and knew that the other needed it (I also feel draw should be in Scarpet), and also to check the permissions in case of command rules.

commented

@Ghoulboy78
I've just seen that in your fork you are working in draw and distance. Since you don't have an issues page (and I don't want to get the bash now to make a clone without overriding mine so I can make a PR), I suggest you to instead of making them built-in apps replace them with Scarpet Rules (docs at #519 comment 2, almost sure it's up-to-date with the changes gnembon made).
That way it's both backwards compatible and can be autoloaded.