private Map<String, Object> getFlagData(ProtectedRegion region) { return FlagUtil.marshal(region.getFlags()); }
/** * Gets a List of all TARDIS regions in a world where the build flag is set. * * @param w the world to get the regions for * @return a list of TARDIS region names for this world */ public List<String> getRegions(World w) { List<String> regions = new ArrayList<>(); RegionManager rm = wg.getRegionContainer().get(new BukkitWorld(w)); rm.getRegions().forEach((key, value) -> { if (key.contains("tardis") && value.getFlags().containsKey(Flags.BUILD)) { regions.add(key); } }); return regions; }
for (Map.Entry<Flag<?>, Object> entry : region.getFlags().entrySet()) { if (entry.getValue() == null) continue;
/** * Copy attributes from another region. * * @param other the other region */ public void copyFrom(ProtectedRegion other) { checkNotNull(other); setMembers(other.getMembers()); setOwners(other.getOwners()); setFlags(other.getFlags()); setPriority(other.getPriority()); try { setParent(other.getParent()); } catch (CircularInheritanceException ignore) { // This should not be thrown } }
public RegionReport(ProtectedRegion region) { super("Region: " + region.getId()); append("Type", region.getType()); append("Priority", region.getPriority()); append("Owners", region.getOwners()); append("Members", region.getMembers()); append("FlagUtil", region.getFlags()); }