WorldGuard

WorldGuard

8M Downloads

[1.8] WoldGuard API Issue

LadyCailinBot opened this issue ยท 1 comments

commented

WORLDGUARD-4044 - Reported by wiz_techno

Hello!

I'm using WorldGuard API and on a PlayerMoveEvent I do this:
[code=Java]for(ProtectedRegion r : WGBukkit.getRegionManager(p.getWorld()).getApplicableRegions(p.getLocation())) {
if (!r.getID == "pvp") {
//Do code that ends pvp match
}
}[/code]
This is to check if a player is in "pvp" arena. If they aren't it ends the match assuming they phased/glitched/teleported their way out. But the problem is a region called "1" is overlapping and for some odd reason, WorldGuard API does not put return r.getID in a List in case of regions overlapping. Instead, to my knowledge, it returns two strings separately. Is there any way we could instead return a list in case of overlapping like this situation here?

commented

Comment by wizjany

not sure what you mean by separate strings. both regions get returned in the list if they are both applicable to the given point.