aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/utils/Area.kt
blob: 8366a0538c93add8e8a00c15a8c6b95574bc417d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.ambientaddons.utils

enum class Area {
    Dungeon,
    PrivateIsland,
    DungeonHub,
    GoldMine,
    DeepCaverns,
    DwarvenMines,
    CrystalHollows,
    SpiderDen,
    CrimsonIsle,
    End,
    Park,
    FarmingIslands;

    companion object {
        fun fromString(str: String?): Area? = when (str?.lowercase()) {
            "Crimson Isle" -> CrimsonIsle
            "Catacombs" -> Dungeon
            "Private Island" -> PrivateIsland
            "Dungeon Hub" -> DungeonHub
            "Gold Mine" -> GoldMine
            "Deep Caverns" -> DeepCaverns
            "Dwarven Mines" -> DwarvenMines
            "Crystal Hollows" -> CrystalHollows
            "Spider's Den" -> SpiderDen
            "The Park" -> Park
            "The End" -> End
            "The Farming Islands" -> FarmingIslands
            else -> null
        }
    }
}