PlaceholderAPI / WorldGuard-Expansion

Placeholder expansion for WorldGuard
GNU General Public License v3.0
1 stars 11 forks source link

[Suggestion]: Add specific region placeholders for WorldGuard #7

Open JohnS19 opened 5 years ago

JohnS19 commented 5 years ago

Hello, It'd be great if placeholderapi can support placeholders for specific regions:

Currently: %worldguard_region_name% %worldguard_region_owner% %worldguard_region_members% %worldguard_region_flags%

Specific Regions: (1 = Region ID) %worldguard_region_1_name% %worldguard_region_1_owner% %worldguard_region_1_members% %worldguard_region_1_flags%

I'm not sure if it is possible or not but, It would be greatly appreciated if this can be implemented. Thanks.

aBooDyy commented 5 years ago

Thanks for your suggestion,

This exactly doesn't seem to be possible now, however, Glare has implemented another way for that, In v1.4.0+ you can set the region location in the placeholder and get the placeholder value for that region, so for example %worldguard_region_name:world,1,2,3% will get the region name in the specified location (World is world, X is 1, Y is 2, Z is 3). It works with all the placeholders, not only region name one.

Will keep the issue opened, just want to let you know about this new feature.

7hatGuyAJ commented 2 years ago

It's been a few years now and something like this is still in great need is there a possibility of adding such a thing yet?

Haui1112 commented 1 year ago

Hi there, I was just searching for this exact thing. I'd like to add a global flag like {greeting: Welcome to %worldguard_region_name%!}. From my current understanding, this would not be possible, right? Any chance this will get added in the future? Thank you for your work and in advance for any answer. Have a good one.

DrZoddiak commented 3 weeks ago

https://github.com/DrZoddiak/WorldGuard-Expansion

I implemented a solution for this. Works similar to how the world,x,y,z args work %wg_placeholder:world,region_name% %worldguard_region_owner:world,spawn%

Poly regions work in this as well, whereas before it would fail silently, things like min/max X/Z are inaccurate, but they are accurately in the region. I didn't want to muck with it, the current impl works for what I wrote it for.