diff --git a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java index a15a9b95c..70f051ef4 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java @@ -73,6 +73,12 @@ public final class GiveCharCommand implements CommandHandler { return; } + // Check level. + if (level > 90) { + CommandHandler.sendMessage(sender, "Invalid avatar level."); + return; + } + // Calculate ascension level. if (level <= 40) { ascension = (int) Math.ceil(level / 20f); @@ -88,6 +94,6 @@ public final class GiveCharCommand implements CommandHandler { avatar.recalcStats(); targetPlayer.addAvatar(avatar); - CommandHandler.sendMessage(sender, String.format("Given %s to %s.", avatarId, target)); + CommandHandler.sendMessage(sender, String.format("Given %s with level %s to %s.", avatarId, level, target)); } }