mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2025-12-19 23:19:29 +00:00
Improved /ecoskills give
This commit is contained in:
@@ -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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user