本文整理匯總了Java中com.sk89q.worldguard.protection.regions.ProtectedRegion.getIntersectingRegions方法的典型用法代碼示例。如果您正苦於以下問題:Java ProtectedRegion.getIntersectingRegions方法的具體用法?Java ProtectedRegion.getIntersectingRegions怎麽用?Java ProtectedRegion.getIntersectingRegions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.sk89q.worldguard.protection.regions.ProtectedRegion
的用法示例。
在下文中一共展示了ProtectedRegion.getIntersectingRegions方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doHotelRegionsOverlap
import com.sk89q.worldguard.protection.regions.ProtectedRegion; //導入方法依賴的package包/類
public static boolean doHotelRegionsOverlap(ProtectedRegion region, World world){
Collection<ProtectedRegion> regions = getRegions(world);
List<ProtectedRegion> inter = region.getIntersectingRegions(regions);
for(ProtectedRegion reg : inter)
if(reg.getId().startsWith("hotel-")) return true;
return false;
}
示例2: doesRoomRegionOverlap
import com.sk89q.worldguard.protection.regions.ProtectedRegion; //導入方法依賴的package包/類
public static boolean doesRoomRegionOverlap(ProtectedRegion region, World world){
Collection<ProtectedRegion> regions = getRegions(world);
List<ProtectedRegion> inter = region.getIntersectingRegions(regions);
for(ProtectedRegion reg : inter)
if(reg.getId().matches("hotel-\\w+-\\d+")) return true; //It's a room region
return false;
}