Enum WarpSortType

java.lang.Object
java.lang.Enum<WarpSortType>
com.olziedev.playerwarps.api.warp.WarpSortType
All Implemented Interfaces:
Serializable, Comparable<WarpSortType>, java.lang.constant.Constable

public enum WarpSortType extends Enum<WarpSortType>
List of all possible sort types.
  • Enum Constant Details

    • HIGHEST_VISITS

      public static final WarpSortType HIGHEST_VISITS
      This constant is when the order will be from the warp most visits.
    • LOWEST_VISITS

      public static final WarpSortType LOWEST_VISITS
      This constant is when the order will be from the warp less visits.
    • ALPHABETICAL

      public static final WarpSortType ALPHABETICAL
      This constant is when the order will be from alphabetical order.
    • OLDEST_DATE

      public static final WarpSortType OLDEST_DATE
      This constant is when the order will be when the warp was created the oldest.
    • NEWEST_DATE

      public static final WarpSortType NEWEST_DATE
      This constant is when the order will be when the warp was created the newest.
    • RATES

      public static final WarpSortType RATES
      This constant is when the order will be from the most rates.
    • RATES_AVERAGE

      public static final WarpSortType RATES_AVERAGE
      This constant is when the order will be from the highest average rates.
    • FAVOURITE_COUNT

      public static final WarpSortType FAVOURITE_COUNT
      This constant is when the order will be from the warp most favourites.
    • PURGED_HIGHEST_VISITS

      public static final WarpSortType PURGED_HIGHEST_VISITS
      This constant is when the order will be from the warp most visits, but purged.
    • PURGED_LOWEST_VISITS

      public static final WarpSortType PURGED_LOWEST_VISITS
      This constant is when the order will be from the warp less visits, but purged.
    • RANDOM

      public static final WarpSortType RANDOM
      This constant is when the order will be random every x seconds.
    • SERVER

      public static final WarpSortType SERVER
      This constant is when the order will be from the server's warps to normal warps.
  • Method Details

    • values

      public static WarpSortType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static WarpSortType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getTypes

      public static List<WarpSortType> getTypes(FileConfiguration configuration)
      Parameters:
      configuration - The configuration file to get the sort types from.
      Returns:
      The sort types from the configuration file.
    • handleSwitch

      public static WarpSortType handleSwitch(WarpSortType warpSortType, FileConfiguration configuration, boolean next)
      Parameters:
      warpSortType - The current sort type, or null if you want to get the next sort type from the config.
      configuration - The configuration file to get the sort types from.
      next - If you want to get the next sort type or the previous sort type.
      Returns:
      The previous sort type.
    • getName

      public String getName(FileConfiguration configuration)
      Parameters:
      configuration - The configuration to get the sort type from.
      Returns:
      The sort type name from the configuration.