Enum WorldType

    • Enum Constant Detail

      • OVER_WORLD

        public static final WorldType OVER_WORLD
      • NETHER

        public static final WorldType NETHER
    • Method Detail

      • values

        public static WorldType[] 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 WorldType 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
      • getBukkitType

        @NotNull
        public org.bukkit.World.Environment getBukkitType()
        Get the bukkit equivalent
        Returns:
        Bukkit equivalent
      • getAliases

        @NotNull
        public @NotNull Collection<String> getAliases()
        Get all aliases of the type name
        Returns:
        Name aliases
      • fromString

        @NotNull
        public static @NotNull Optional<WorldType> fromString​(@NotNull
                                                              @NotNull String string)
        Attempt to map a string to a world type
        Parameters:
        string - String to match
        Returns:
        Optional containing the type, if found
      • fromBukkit

        @NotNull
        public static @NotNull WorldType fromBukkit​(@NotNull
                                                    org.bukkit.World.Environment environment)
        Get the world type from a bukkit environment
        Parameters:
        environment - Bukkit environment
        Returns:
        Equivalent Hyperverse world type