CommandHelper

CommandHelper

46.5k Downloads

(Suggestion) WorldGuard: Find regions by owner/member

ZeekDaGeek opened this issue ยท 4 comments

commented

There is WorldGuard implementation to some degree, however, one of the features I find myself needing is finding the regions owned by a specific user. Listed on the WorldGuard wiki are the following commands:

/region list .{owners name} (note the dot)
/region list +{member name} (note the plus)

http://wiki.sk89q.com/wiki/WorldGuard/Regions/Commands

Is there any way we can have this accessible to us in a return array?

commented

I believe this can be done by manipulation of the WG functions. Are you aware of the WG/WE functions? http://wiki.sk89q.com/wiki/CommandHelper/API#WorldEdit You should be able to iterate through all the regions with sk_all_regions, and look for the specific person in each one, and construct an array yourself. Does this do what you're asking?

commented

That would be a temporary fix, however, I currently have hundreds of regions, and to check each and everyone one would become more taxing as the server grows.

commented

I have the same problem too, but commandhelper can't make it much faster.
We have to wait till multi threading comes, then it would work, but adding an apart functions isn't a fix.

commented

Yeah, I'm gonna close this now. Now that set_interval and friends exist, you can do this now, and cache it. This cache can be regenerated slowly, which won't tax the server, and you can do all that yourself now.