9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2025-12-20 07:29:31 +00:00

Improved /ecoskills give

This commit is contained in:
Auxilor
2023-10-16 21:28:15 +01:00
parent ceb5d56a57
commit c14b51f91f

View File

@@ -31,16 +31,16 @@ class CommandGive(plugin: EcoPlugin) :
"invalid-skill-stat" "invalid-skill-stat"
) )
val amount = notifyNull(args.getOrNull(2)?.toIntOrNull(), "invalid-amount") val amount = notifyNull(args.getOrNull(2)?.toDoubleOrNull(), "invalid-amount")
val key = when (obj) { val key = when (obj) {
is Skill -> { is Skill -> {
player.giveSkillXP(obj, amount.toDouble()) player.giveSkillXP(obj, amount)
"gave-skill-xp" "gave-skill-xp"
} }
is Stat -> { is Stat -> {
player.giveBaseStatLevel(obj, amount) player.giveBaseStatLevel(obj, amount.toInt())
"gave-stat" "gave-stat"
} }