本文整理匯總了Java中net.milkbowl.vault.economy.Economy.depositPlayer方法的典型用法代碼示例。如果您正苦於以下問題:Java Economy.depositPlayer方法的具體用法?Java Economy.depositPlayer怎麽用?Java Economy.depositPlayer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.milkbowl.vault.economy.Economy
的用法示例。
在下文中一共展示了Economy.depositPlayer方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
@Override
public void run(Player player) {
final Economy economy = EconomyManager.getEconomy();
if (economy == null) {
Uppercore.logger().severe("Cannot find vault's economy!");
return;
}
economy.depositPlayer(player, value.resolve(player));
}
示例2: giveMoneyReward
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
public void giveMoneyReward(Player player, double money) {
Double doubleMoney = money;
if (this.economyProvider != null) {
Economy economy = economyProvider.getProvider();
if (economy.bankBalance(player.getName()) != null)
{
economy.depositPlayer(player.getName(), money);
player.sendMessage(ChatColor.GREEN + "[" + ChatColor.GRAY + _vendorName + ChatColor.GREEN + "] - " + ChatColor.GREEN + "You received " + ChatColor.GOLD + doubleMoney.intValue() + " gold");
}
}
}
示例3: giveMoneyReward
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
public void giveMoneyReward(Player player, double money) {
if (this.economyProvider != null) {
Economy economy = economyProvider.getProvider();
if (economy.bankBalance(player.getName()) != null)
{
economy.depositPlayer(player.getName(), money);
}
}
}
示例4: giveMoneyReward
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
public void giveMoneyReward(Player player) {
if (this.economyProvider != null) {
Economy economy = economyProvider.getProvider();
if (economy.bankBalance(player.getName()) != null)
{
economy.depositPlayer(player.getName(), MaxMoney);
}
}
}
示例5: rewardMoney
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
/**
* Gives a money reward to a player.
*
* @param player
* @param amount
* @return the reward text to display to the player
*/
private String rewardMoney(Player player, int amount) {
Economy economy = plugin.getRewardParser().getEconomy();
if (economy != null) {
economy.depositPlayer(player, amount);
String currencyName = plugin.getRewardParser().getCurrencyName(amount);
return ChatColor.translateAlternateColorCodes('&',
StringUtils.replaceOnce(langMoneyRewardReceived, "AMOUNT", amount + " " + currencyName));
}
plugin.getLogger().warning("You have specified a money reward but Vault was not linked successfully.");
return "";
}
示例6: setEconomy
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
public static void setEconomy(Economy econ, JSONObject data, Player player) {
try {
if (data.has("bank-balance")) {
econ.bankWithdraw(player.getName(), econ.bankBalance(player.getName()).balance);
econ.bankDeposit(player.getName(), data.getDouble("bank-balance"));
}
econ.withdrawPlayer(String.valueOf(player), econ.getBalance(String.valueOf(player)));
econ.depositPlayer(String.valueOf(player), data.getDouble("balance"));
} catch (JSONException ex) {
ex.printStackTrace();
}
}
示例7: deserialize
import net.milkbowl.vault.economy.Economy; //導入方法依賴的package包/類
public static void deserialize(Economy econ, JsonObject data, Player player) {
if (data.has("balance")) {
ConsoleLogger.debug("[ECON] Depositing " + data.get("balance").getAsDouble() + " to '" + player.getName() + "'!");
econ.depositPlayer(player, data.get("balance").getAsDouble());
}
}