Closed Sliman4 closed 1 year ago
Also added "protectionOverrides": {"adaptation-name": {"WorldGuard": false}}
in plugins/Adapt/adapt/adapt.json
so users can enable or disable region protections per-adaptation
Are you sure this works? Adding "whatever-adaptation-names-here" in the config doesn't update anything? or maybe I misunderstood what this was to do.
If requireWorldguardBuildPermToUseAdaptations
= true
and protectionOverrides.<adaptation-name>.WorldGuard
= false, then this adaptation won't require the worldguard permission to use, but all other adaptations will preserve the default true
value. Or if requireWorldguardBuildPermToUseAdaptations
= false
and protectionOverrides.<adaptation-name>.WorldGuard
= true
, it will require worldguard permission for this adaptation. While testing, make sure that you're not /op (you don't have the worldguard bypass permission) and you're not the region owner.
I get that, can you please show me an example in the config of adding multiple skills, something that you're using in your used case so I can try to use it on my end, and once I validate that it's working properly and I understand how you're using it I'll add it to the documentation and then make an update for it
additionally, it doesn't seem like it updates and adds the world guard flags
oH wait i get it, you arent doing an independent flag, but you are doing a single flag for worldguard, use-adaptations is plural for the region, I get it. i thought you were saying you added it for every skill.
but this does not add the flag node to worldguard? Were you able to?
"protectionOverrides": {"rift-blink": {"WorldGuard": false}}
Allows players to use rift-blink
in worldguard regions even if requireWorldguardBuildPermToUseAdaptations
is enabled
Btw I just found a bug with rift-blink, when you unlearn this adaptation (or do anything else to make hasAdaptation
return false) while jumping, you can press spacebar again, and you'll fly. I found this bug trying to test teleportation from the edge of the region, when you cross the region border before pressing the spacebar the second time
Btw I just found a bug with rift-blink, when you unlearn this adaptation (or do anything else to make
hasAdaptation
return false) while jumping, you can press spacebar again, and you'll fly. I found this bug trying to test teleportation from the edge of the region, when you cross the region border before pressing the spacebar the second time
sigh ok sounds good ill look at that
but this does not add the flag node to worldguard? Were you able to?
"protectionOverrides": {"rift-blink": {"WorldGuard": false}}
Allows players to use
rift-blink
in worldguard regions even ifrequireWorldguardBuildPermToUseAdaptations
is enabled
Yea this is wrong, you cant add a specific node to the worldguard segment in the config. "protectionOverrides": {"rift-blink": {"WorldGuard": false}} is what I'm referencing. i can make it iterated and add ALL keys to the registry like every adaptation and it can be independent, but that snippet does nothing
It doesn't create the rift-blink flag, it basically says "the worldguard flag is not needed for rift-blink". Or if you want it to also be available in faction claims (#396), you can set "protectionOverrides": {"rift-blink": {"WorldGuard": false, "Factions": false}}
, it means "skip worldguard and factions checks for rift-blink"
This PR moves region protection code to a separate package (
com.volmit.adapt.api.protection
), adds protection API (DefaultProtectors.registerProtector(Protector)
) so other plugins can add their own implementations, and addsuse-adaptations
flag. If the flag is not defined in the WG region, the default value isallow
ifrequireWorldguardBuildPermToUseAdaptations: false
or if the player hasbuild
permission in the region, I think that's how it worked before this PR.