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:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user