Skip to content

Commit

Permalink
bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
zavdav committed Jan 29, 2025
1 parent 59d3a26 commit 2a45194
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
}

double creationCost = settings.getConfigDouble("settings.warp.price.amount");
if (creationCost > 0 && !village.hasEnough(creationCost)) {
String message = language.getMessage("command_village_setwarp_insufficient_funds")
.replace("%cost%", String.valueOf(creationCost));
commandSender.sendMessage(message);
return true;
if (creationCost > 0) {
if (!village.hasEnough(creationCost)) {
String message = language.getMessage("command_village_setwarp_insufficient_funds")
.replace("%cost%", String.valueOf(creationCost));
commandSender.sendMessage(message);
return true;
}
village.subtractBalance(creationCost);
}
VSpawnCords cords = new VSpawnCords(player.getLocation());
village.addWarp(warpName, cords);
Expand Down

0 comments on commit 2a45194

Please sign in to comment.