This commit is contained in:
Jkobs 2022-03-13 21:58:50 +01:00
parent 810e61f0e2
commit cd9cd478b5
2 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>11.1</version>
<version>11.2</version>
<packaging>jar</packaging>
<name>T2CodeLib</name>

View File

@ -22,12 +22,20 @@ public class Vault {
}
p.sendMessage(prefix + "\n" + SelectLibMsg.VaultNotSetUp + "\n" + prefix);
} else {
if (Main.eco.getBalance(p) < price) {
return false;
} else {
Main.eco.withdrawPlayer(p, price);
return true;
return Main.eco.withdrawPlayer(p,price).transactionSuccess();
}
return false;
}
public static boolean addMoney(String prefix, Player p, Double price) {
if (Main.eco == null) {
if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
send.console(prefix + " §4\n" + prefix + " §4Vault could not be found! §9Please download it here: " +
"§6https://www.spigotmc.org/resources/vault.34315/§4\n" + prefix);
}
p.sendMessage(prefix + "\n" + SelectLibMsg.VaultNotSetUp + "\n" + prefix);
} else {
return Main.eco.depositPlayer(p,price).transactionSuccess();
}
return false;
}