Class GameModeTypeFlag

java.lang.Object
com.sk89q.worldguard.protection.flags.Flag<com.sk89q.worldedit.world.gamemode.GameMode>
com.sk89q.worldguard.protection.flags.GameModeTypeFlag

@Deprecated public class GameModeTypeFlag extends Flag<com.sk89q.worldedit.world.gamemode.GameMode>
Deprecated.
replaced by RegistryFlag<com.sk89q.worldedit.world.gamemode.GameMode>, will be removed in WorldGuard 8
Stores an gamemode type.
  • Constructor Details

    • GameModeTypeFlag

      protected GameModeTypeFlag(String name, @Nullable RegionGroup defaultGroup)
      Deprecated.
    • GameModeTypeFlag

      protected GameModeTypeFlag(String name)
      Deprecated.
  • Method Details

    • parseInput

      public com.sk89q.worldedit.world.gamemode.GameMode parseInput(FlagContext context) throws InvalidFlagFormat
      Deprecated.
      Description copied from class: Flag
      Parse a given input to coerce it to a type compatible with the flag.
      Specified by:
      parseInput in class Flag<com.sk89q.worldedit.world.gamemode.GameMode>
      Parameters:
      context - the FlagContext
      Returns:
      The coerced type
      Throws:
      InvalidFlagFormat - Raised if the input is invalid
    • unmarshal

      public com.sk89q.worldedit.world.gamemode.GameMode unmarshal(@Nullable Object o)
      Deprecated.
      Description copied from class: Flag
      Convert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses.
      Specified by:
      unmarshal in class Flag<com.sk89q.worldedit.world.gamemode.GameMode>
      Parameters:
      o - The object
      Returns:
      The unmarshalled type
    • marshal

      public Object marshal(com.sk89q.worldedit.world.gamemode.GameMode o)
      Deprecated.
      Description copied from class: Flag
      Convert the value stored for this flag into a type that can be serialized into YAML.
      Specified by:
      marshal in class Flag<com.sk89q.worldedit.world.gamemode.GameMode>
      Parameters:
      o - The object
      Returns:
      The marshalled type