It can now run in console
This commit is contained in:
@@ -23,10 +23,11 @@ class CommandGiveXP(plugin: EcoPlugin) : Subcommand(plugin, "givexp", "ecopets.c
|
|||||||
sender.sendMessage(plugin.langYml.getMessage("needs-amount"))
|
sender.sendMessage(plugin.langYml.getMessage("needs-amount"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var player: Player = sender as Player
|
var player = sender
|
||||||
if (args.size == 3){
|
if (args.size == 3){
|
||||||
player = Bukkit.getPlayer(args[2])!!
|
player = Bukkit.getPlayer(args[2])!!
|
||||||
}
|
}
|
||||||
|
if (!(player is Player)) return;
|
||||||
val pet = Pets.getByID(args[0])
|
val pet = Pets.getByID(args[0])
|
||||||
|
|
||||||
if (pet == null) {
|
if (pet == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user