diff --git a/geary-papermc-plugin/src/main/kotlin/com/mineinabyss/geary/papermc/plugin/GearyCommands.kt b/geary-papermc-plugin/src/main/kotlin/com/mineinabyss/geary/papermc/plugin/GearyCommands.kt index 24daa09..eda3dc8 100644 --- a/geary-papermc-plugin/src/main/kotlin/com/mineinabyss/geary/papermc/plugin/GearyCommands.kt +++ b/geary-papermc-plugin/src/main/kotlin/com/mineinabyss/geary/papermc/plugin/GearyCommands.kt @@ -71,11 +71,13 @@ internal class GearyCommands : IdofrontCommandExecutor(), TabCompleter { val prefabKey by optionArg(options = gearyItems.prefabs.run { toList { it.key.toString() } }) { parseErrorMessage = { "No such entity: $passed" } } + val amount by intArg { default = 1 } playerAction { val item = gearyItems.createItem(PrefabKey.of(prefabKey)) ?: run { sender.error("Failed to spawn $prefabKey") return@playerAction } + item.amount = amount.coerceIn(1, 64) player.inventory.addItem(item) } } diff --git a/gradle.properties b/gradle.properties index 583b114..44ba302 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ kotlin.code.style=official group=com.mineinabyss version=0.27 -idofrontVersion=0.20.6 +idofrontVersion=0.20.14 gearyVersion=0.23-SNAPSHOT