AddMoney #4
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>11.1</version>
|
<version>11.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2CodeLib</name>
|
<name>T2CodeLib</name>
|
||||||
|
@ -22,12 +22,20 @@ public class Vault {
|
|||||||
}
|
}
|
||||||
p.sendMessage(prefix + "\n" + SelectLibMsg.VaultNotSetUp + "\n" + prefix);
|
p.sendMessage(prefix + "\n" + SelectLibMsg.VaultNotSetUp + "\n" + prefix);
|
||||||
} else {
|
} else {
|
||||||
if (Main.eco.getBalance(p) < price) {
|
return Main.eco.withdrawPlayer(p,price).transactionSuccess();
|
||||||
return false;
|
}
|
||||||
} else {
|
return false;
|
||||||
Main.eco.withdrawPlayer(p, price);
|
}
|
||||||
return true;
|
|
||||||
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user