Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit f0bfe55

Browse files
committed
repair full insufficient exp notify
1 parent 146d8a1 commit f0bfe55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/cat/nyaa/nyaautils/repair/RepairCommands.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ public void repairFull(CommandSender sender, Arguments args) {
122122
return;
123123
}
124124
Player p = asPlayer(sender);
125+
if (p.getTotalExperience() < info.expConsumption) {
126+
msg(sender, "user.repair.no_enough_exp");
127+
return;
128+
}
125129

126130
int expMax = (int)Math.floor(p.getTotalExperience()/(double)info.expConsumption);
127131
int materialMax = material.getAmount();

0 commit comments

Comments
 (0)