diff --git a/pom.xml b/pom.xml
index e58aa22..133459a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
tsp.headdb
HeadDB
- 4.4.0
+ 4.4.1
jar
diff --git a/src/main/java/tsp/headdb/inventory/InventoryUtils.java b/src/main/java/tsp/headdb/inventory/InventoryUtils.java
index 2473a7c..4979fff 100644
--- a/src/main/java/tsp/headdb/inventory/InventoryUtils.java
+++ b/src/main/java/tsp/headdb/inventory/InventoryUtils.java
@@ -337,15 +337,14 @@ public class InventoryUtils {
Utils.sendMessage(player, String.format(localization.getMessage("purchasedHead"), amount, description, cost));
Utils.playSound(player, "paid");
result.accept(true);
- return;
}
});
+ } else {
+ Utils.sendMessage(player, String.format(localization.getMessage("notEnoughMoney"), amount, description));
+ Utils.playSound(player, "unavailable");
+ result.accept(false);
}
});
-
- Utils.sendMessage(player, String.format(localization.getMessage("notEnoughMoney"), amount, description));
- Utils.playSound(player, "unavailable");
- result.accept(false);
return;
}
@@ -379,12 +378,8 @@ public class InventoryUtils {
}
private static void runPurchaseCommands() {
- // Backwards compatability
- if (!config.contains("commands.purchase")) {
- return;
- }
-
for (String cmd : config.getStringList("commands.purchase")) {
+ if (cmd.isEmpty()) continue;
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), cmd);
}
}