9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2025-12-19 15:09:23 +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"
)
val amount = notifyNull(args.getOrNull(2)?.toIntOrNull(), "invalid-amount")
val amount = notifyNull(args.getOrNull(2)?.toDoubleOrNull(), "invalid-amount")
val key = when (obj) {
is Skill -> {
player.giveSkillXP(obj, amount.toDouble())
player.giveSkillXP(obj, amount)
"gave-skill-xp"
}
is Stat -> {
player.giveBaseStatLevel(obj, amount)
player.giveBaseStatLevel(obj, amount.toInt())
"gave-stat"
}