diff --git a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt index 468bdaf96..f4622e20b 100644 --- a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt @@ -67,7 +67,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ return@define } val id = args[1].toIntOrNull() ?: return@define - var amount = (args.getOrNull(2) ?: "1").toInt() + var amount = args.getOrNull(2)?.toIntOrNull() ?: 1 if (id > Cache.getItemDefinitionsSize()) { reject(player,"Item ID '$id' out of range.") return@define