com.intellectualcrafters.plot.flag

## Class FlagManager

- java.lang.Object
- - com.intellectualcrafters.plot.flag.FlagManager

-     public class FlagManager
      extends java.lang.Object

  Flag Manager Utility

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlagManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `addFlag(AbstractFlag flag)` Register an AbstractFlag with PlotSquared
    `static AbstractFlag` | `getFlag(java.lang.String string)` Get an AbstractFlag by a string Returns null if flag does not exist
    `static AbstractFlag` | `getFlag(java.lang.String string, boolean create)` Get an AbstractFlag by a string
    `static java.util.List<AbstractFlag>` | `getFlags()` Get a list of registered AbstractFlag objects
    `static java.util.List<AbstractFlag>` | `getFlags(org.bukkit.entity.Player player)` Get a list of registerd AbstragFlag objects based on player permissions
    `static java.util.List<AbstractFlag>` | `getPlotFlags(Plot plot)` Get the flags for a plot
    `static Flag[]` | `parseFlags(java.util.List<java.lang.String> flagstrings)`
    `static boolean` | `removeFlag(AbstractFlag flag)` Remove a registered AbstractFlag
    `static Flag[]` | `removeFlag(Flag[] flags, java.lang.String r)`
    `static Flag[]` | `removeFlag(java.util.Set<Flag> flags, java.lang.String r)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FlagManager

          public FlagManager()

  - ### Method Detail

    - #### addFlag

          public static boolean addFlag(AbstractFlag flag)

      Register an AbstractFlag with PlotSquared
      Parameters:
        `flag` - Flag to register
      Returns:
        success?

    - #### removeFlag

          public static Flag[] removeFlag(Flag[] flags,
                          java.lang.String r)

    - #### removeFlag

          public static Flag[] removeFlag(java.util.Set<Flag> flags,
                          java.lang.String r)

    - #### getFlags

          public static java.util.List<AbstractFlag> getFlags()

      Get a list of registered AbstractFlag objects
      Returns:
        List (AbstractFlag)

    - #### getFlags

          public static java.util.List<AbstractFlag> getFlags(org.bukkit.entity.Player player)

      Get a list of registerd AbstragFlag objects based on player permissions
      Parameters:
        `player` - with permissions
      Returns:
        List (AbstractFlag)

    - #### getFlag

          public static AbstractFlag getFlag(java.lang.String string)

      Get an AbstractFlag by a string Returns null if flag does not exist
      Parameters:
        `string` - Flag Key
      Returns:
        AbstractFlag

    - #### getFlag

          public static AbstractFlag getFlag(java.lang.String string,
                             boolean create)

      Get an AbstractFlag by a string
      Parameters:
        `string` - Flag Key
        `create` - If to create the flag if it does not exist
      Returns:
        AbstractFlag

    - #### removeFlag

          public static boolean removeFlag(AbstractFlag flag)

      Remove a registered AbstractFlag
      Parameters:
        `flag` - Flag Key
      Returns:
        boolean Result of operation

    - #### parseFlags

          public static Flag[] parseFlags(java.util.List<java.lang.String> flagstrings)

    - #### getPlotFlags

          public static java.util.List<AbstractFlag> getPlotFlags(Plot plot)

      Get the flags for a plot
      Parameters:
        `plot` - Plot to search in
      Returns:
        List (AbstractFlag)