private Set<String> getMessages(LocalPlayer player, ApplicableRegionSet set) { return Sets.newLinkedHashSet(set.queryAllValues(player, Flags.FAREWELL_MESSAGE)); }
/** * Get the effective values for a flag, returning a collection of all * values. It is up to the caller to determine which value, if any, * from the collection will be used. * * <p>{@code player} can be non-null to satisfy region group requirements, * otherwise it will be assumed that the caller that is not a member of any * regions. (FlagUtil on a region can be changed so that they only apply * to certain users.) The player argument is required if the * {@link Flags#BUILD} flag is the flag being queried.</p> * * @param location the location * @param associable an optional associable * @param flag the flag * @return a collection of values * @see RegionResultSet#queryAllValues(RegionAssociable, Flag) */ public <V> Collection<V> queryAllValues(Location location, @Nullable RegionAssociable associable, Flag<V> flag) { return getApplicableRegions(location).queryAllValues(associable, flag); }
/** * Get the effective values for a flag, returning a collection of all * values. It is up to the caller to determine which value, if any, * from the collection will be used. * * <p>{@code player} can be non-null to satisfy region group requirements, * otherwise it will be assumed that the caller that is not a member of any * regions. (FlagUtil on a region can be changed so that they only apply * to certain users.) The player argument is required if the * {@link Flags#BUILD} flag is the flag being queried.</p> * * @param location the location * @param player an optional player, which would be used to determine the region group to apply * @param flag the flag * @return a collection of values * @see RegionResultSet#queryAllValues(RegionAssociable, Flag) */ public <V> Collection<V> queryAllValues(Location location, @Nullable LocalPlayer player, Flag<V> flag) { return getApplicableRegions(location).queryAllValues(player, flag); }
@Override public boolean onCrossBoundary(LocalPlayer player, Location from, Location to, ApplicableRegionSet toSet, Set<ProtectedRegion> entered, Set<ProtectedRegion> exited, MoveType moveType) { Collection<String> messages = toSet.queryAllValues(player, Flags.GREET_MESSAGE);