Class GamemodeFlag

    • Field Detail

      • GAMEMODE_SURVIVAL

        public static final GamemodeFlag GAMEMODE_SURVIVAL
      • GAMEMODE_CREATIVE

        public static final GamemodeFlag GAMEMODE_CREATIVE
      • GAMEMODE_ADVENTURE

        public static final GamemodeFlag GAMEMODE_ADVENTURE
      • GAMEMODE_SPECTATOR

        public static final GamemodeFlag GAMEMODE_SPECTATOR
    • Method Detail

      • parse

        public GamemodeFlag parse​(@NotNull
                                  @NotNull String input)
                           throws FlagParseException
        Description copied from class: WorldFlag
        Parse a string into a flag, and throw an exception in the case that the string does not represent a valid flag value. This instance won't change its state, but instead an instance holding the parsed flag value will be returned.
        Specified by:
        parse in class WorldFlag<org.bukkit.GameMode,​GamemodeFlag>
        Parameters:
        input - String to parse.
        Returns:
        Parsed value, if valid.
        Throws:
        FlagParseException - If the value could not be parsed.
      • merge

        public GamemodeFlag merge​(@NotNull
                                  @NotNull org.bukkit.GameMode newValue)
        Description copied from class: WorldFlag
        Merge this flag's value with another value and return an instance holding the merged value.
        Specified by:
        merge in class WorldFlag<org.bukkit.GameMode,​GamemodeFlag>
        Parameters:
        newValue - New flag value.
        Returns:
        Flag containing parsed flag value.
      • toString

        public String toString()
        Description copied from class: WorldFlag
        Returns a string representation of the flag instance, that when passed through WorldFlag.parse(String) will result in an equivalent instance of the flag.
        Specified by:
        toString in class WorldFlag<org.bukkit.GameMode,​GamemodeFlag>
        Returns:
        String representation of the flag
      • getExample

        public String getExample()
        Description copied from class: WorldFlag
        An example of a string that would parse into a valid flag value.
        Specified by:
        getExample in class WorldFlag<org.bukkit.GameMode,​GamemodeFlag>
        Returns:
        An example flag value.
      • getTabCompletions

        public Collection<String> getTabCompletions()
        Description copied from class: WorldFlag
        Get the tab completable values associated with the flag type, or an empty collection if tab completion isn't supported.
        Overrides:
        getTabCompletions in class WorldFlag<org.bukkit.GameMode,​GamemodeFlag>
        Returns:
        Collection containing tab completable flag values