mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-21 05:21:22 +01:00
Cursed refactor ?
This commit is contained in:
parent
787ad69928
commit
4839bbe72f
@ -84,7 +84,11 @@ class CommandGiveRandomBook(plugin: EcoPlugin) : PluginCommand(
|
||||
1 -> Bukkit.getOnlinePlayers().map { it.name }
|
||||
2 -> (EnchantmentRarities.values().map { it.id } + EnchantmentTypes.values().map { it.id })
|
||||
3 -> (1..10).map { it.toString() }
|
||||
4 -> ((args[3].toIntOrNull() ?: 1)..(args[3].toIntOrNull() ?: 1) + 10).map { it.toString() }
|
||||
4 -> {
|
||||
val startLevel = args[3].toIntOrNull() ?: 1
|
||||
val endLevel = startLevel + 10
|
||||
(startLevel..endLevel).map { it.toString() }
|
||||
}
|
||||
else -> emptyList()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user