Add custom Domains for domains used through the api#1866
Add custom Domains for domains used through the api#1866Joo200 merged 2 commits intoEngineHub:masterfrom
Conversation
5d49557 to
7771e06
Compare
|
initial thoughts:
|
|
I looked in the code and I don't think we should add the custom domains to /rg addmember|addowner|removemember|removeowner commands. With the current DomainInputResolver there is no way to check for actors permissions and there is not really a "context" for the CustomDomain (e.g. the actor, the used ProtectedRegion or whether it's the owner or member domain). Two new commands should work better for that: |
4435b30 to
1f32702
Compare
|
I removed the new commands as discussed on the discord. Maybe there should be some way to get a list of available custom domains but I don't know how that should be done. |
|
not super-worried about discoverability atm as these will probably be niche for a while and will never be as much as flags. once piston happens suggestions will help. |
1f32702 to
be23d4b
Compare
worldguard-core/src/main/java/com/sk89q/worldguard/domains/CustomDomain.java
Outdated
Show resolved
Hide resolved
worldguard-core/src/main/java/com/sk89q/worldguard/domains/DefaultDomain.java
Show resolved
Hide resolved
worldguard-core/src/main/java/com/sk89q/worldguard/domains/registry/SimpleDomainRegistry.java
Outdated
Show resolved
Hide resolved
worldguard-core/src/main/java/com/sk89q/worldguard/domains/registry/InvalidDomainFormat.java
Outdated
Show resolved
Hide resolved
c8a6e59 to
924bfd7
Compare
af7c915 to
a52f466
Compare
a52f466 to
e91b1d8
Compare
...guard-core/src/main/java/com/sk89q/worldguard/internal/permission/RegionPermissionModel.java
Outdated
Show resolved
Hide resolved
This change allows third party plugins to dynamically add custom domains to WorldGuard.
669e68c to
d1ac877
Compare
Sometimes it can be handy to add custom domains instead of the player uuid, name or a permission group.
E.g. if you have more dynamic domains or you don't want to sync the members and/or owners between your region and worldguard.
Idea
Add some own domains to the DefaultDomain of regions. E.g. add your custom domain which determines the membership status by playtime.
You add your "ApiDomain" (maybe we can find a better name here) to the DefaultDomain with some informations how to parse your custom Domain to the regions.yml and backwards. There is a Registry for custom Factories for ApiDomains, where you have to register the ApiDomain and the Factory in onLoad (like the existing FlagFactory).
Missing points
Add this to sql storage (or ignore it)we just ignore it, sql storage can't handle custom domains.