aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/utils/Area.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/utils/Area.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/utils/Area.kt34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/kotlin/com/ambientaddons/utils/Area.kt b/src/main/kotlin/com/ambientaddons/utils/Area.kt
new file mode 100644
index 0000000..8366a05
--- /dev/null
+++ b/src/main/kotlin/com/ambientaddons/utils/Area.kt
@@ -0,0 +1,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
+ }
+ }
+} \ No newline at end of file