本文整理汇总了Java中net.milkbowl.vault.economy.EconomyResponse.ResponseType.NOT_IMPLEMENTED属性的典型用法代码示例。如果您正苦于以下问题:Java ResponseType.NOT_IMPLEMENTED属性的具体用法?Java ResponseType.NOT_IMPLEMENTED怎么用?Java ResponseType.NOT_IMPLEMENTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.milkbowl.vault.economy.EconomyResponse.ResponseType
的用法示例。
在下文中一共展示了ResponseType.NOT_IMPLEMENTED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBank
@Override
public EconomyResponse createBank(String name, String player) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// BankAccount bank = eco.bank(name).addOwner(player);
// if (bank.exists())
// return new EconomyResponse(0, 0, ResponseType.FAILURE, "Unable to create bank!");
// else
// return new EconomyResponse(0, 0, ResponseType.SUCCESS, "Created bank " + name);
}
示例2: deleteBank
@Override
public EconomyResponse deleteBank(String name) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// Account deleted = eco.bank(name).delete();
// if (deleted.exists())
// return new EconomyResponse(0, 0, ResponseType.FAILURE, "Unable to delete bank account!");
// else
// return new EconomyResponse(0, 0, ResponseType.SUCCESS, "Deleted bank account (or it didn't exist)");
}
示例3: bankBalance
@Override
public EconomyResponse bankBalance(String name) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// double balance = eco.bank(name).balance();
// return new EconomyResponse(0, balance,
// ResponseType.SUCCESS, "Balance of bank "+ name +": "+ balance);
}
示例4: bankHas
@Override
public EconomyResponse bankHas(String name, double amount) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// BankAccount bank = eco.bank(name);
// double balance = bank.balance();
// if (bank.has(amount))
// return new EconomyResponse(0, balance, ResponseType.SUCCESS, "Bank " + name + " has at least " + amount );
// else
// return new EconomyResponse(0, balance, ResponseType.FAILURE, "Bank " + name + " does not have at least " + amount );
}
示例5: bankWithdraw
@Override
public EconomyResponse bankWithdraw(String name, double amount) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// BankAccount bank = eco.bank(name);
// TransactionResult result = bank.remove(amount);
// if (result == TransactionResult.SUCCESS)
// return new EconomyResponse(amount, bank.balance(), ResponseType.SUCCESS, "Removed " + amount + " from bank " + name);
// else
// return new EconomyResponse(0, bank.balance(), ResponseType.SUCCESS, "Failed to remove " + amount + " from bank " + name);
}
示例6: bankDeposit
@Override
public EconomyResponse bankDeposit(String name, double amount) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// BankAccount bank = eco.bank(name);
// TransactionResult result = bank.add(amount);
// if (result == TransactionResult.SUCCESS)
// return new EconomyResponse(amount, bank.balance(), ResponseType.SUCCESS, "Added " + amount + " to bank " + name);
// else
// return new EconomyResponse(0, bank.balance(), ResponseType.SUCCESS, "Failed to add " + amount + " to bank " + name);
}
示例7: getBalance
@Override
public double getBalance() {
EconomyResponse response = _economy.bankBalance(_name);
if (response.type == ResponseType.NOT_IMPLEMENTED)
throw new UnsupportedOperationException();
return response.amount;
}
示例8: hasAccount
@Override
public boolean hasAccount(UUID playerId) {
PreCon.notNull(playerId);
EconomyResponse response = _economy.isBankMember(_name, Bukkit.getOfflinePlayer(playerId));
if (response.type == ResponseType.NOT_IMPLEMENTED)
throw new UnsupportedOperationException();
return response.type == ResponseType.SUCCESS;
}
示例9: getOwnerId
/**
* Because vault does not support getting bank owner id,
* Results may return null if the owner is not online.
*/
@Nullable
@Override
public UUID getOwnerId() {
if (_ownerId == null) {
Collection<? extends Player> players = Bukkit.getOnlinePlayers();
UUID ownerId = null;
for (Player player : players) {
EconomyResponse response = _economy.isBankOwner(_name, Bukkit.getOfflinePlayer(player.getUniqueId()));
if (response.type == ResponseType.NOT_IMPLEMENTED)
break;
if (response.type == ResponseType.SUCCESS) {
ownerId = player.getUniqueId();
break;
}
}
_ownerId = new Result<UUID>(false, ownerId);
}
return _ownerId.getResult();
}
示例10: bankHas
@Override
public EconomyResponse bankHas(String name, double amount) {
if (!GoldIsMoney.hasBankSupport()) {
return new EconomyResponse(0, 0, ResponseType.NOT_IMPLEMENTED, "GoldIsMoney bank support is disabled!");
}
if (!GoldIsMoney.bankExists(name)) {
return new EconomyResponse(0, 0, ResponseType.FAILURE, "That bank does not exist!");
}
if (GoldIsMoney.bankHas(name, amount)) {
return new EconomyResponse(0, GoldIsMoney.bankBalance(name), ResponseType.FAILURE, "The bank does not have enough money!");
}
return new EconomyResponse(0, GoldIsMoney.bankBalance(name), ResponseType.SUCCESS, "");
}
示例11: createBank
@Override
public EconomyResponse createBank(String name, String player) {
if (!GoldIsMoney.hasBankSupport()) {
return new EconomyResponse(0, 0, ResponseType.NOT_IMPLEMENTED, "GoldIsMoney bank support is disabled!");
}
if (!GoldIsMoney.createBank(name, player)) {
return new EconomyResponse(0, 0, ResponseType.FAILURE, "Unable to create bank account.");
}
return new EconomyResponse(0, GoldIsMoney.bankBalance(name), ResponseType.SUCCESS, "");
}
示例12: bankDeposit
@Override
public EconomyResponse bankDeposit(String name, double amount) {
if (!GoldIsMoney.hasBankSupport()) {
return new EconomyResponse(0, 0, ResponseType.NOT_IMPLEMENTED, "GoldIsMoney bank support is disabled!");
}
if (!GoldIsMoney.bankExists(name)) {
return new EconomyResponse(0, 0, ResponseType.FAILURE, "That bank does not exist!");
}
if (!GoldIsMoney.bankDeposit(name, amount)) {
return new EconomyResponse(0, GoldIsMoney.bankBalance(name), ResponseType.FAILURE, "Unable to deposit to that bank account!");
}
return new EconomyResponse(amount, GoldIsMoney.bankBalance(name), ResponseType.SUCCESS, "");
}
示例13: notImplementedBank
private EconomyResponse notImplementedBank() {
return new EconomyResponse(0, 0, ResponseType.NOT_IMPLEMENTED, "Jecon does not support bank.");
}
示例14: isBankOwner
@Override
public EconomyResponse isBankOwner(String name, String playerName) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// return new EconomyResponse(0, 0, eco.bank(name).isOwner(playerName)? ResponseType.SUCCESS : FAILURE, "");
}
示例15: isBankMember
@Override
public EconomyResponse isBankMember(String name, String playerName) {
return new EconomyResponse(0,0, ResponseType.NOT_IMPLEMENTED, LANG.plugin_vault_notImplemented);
// return new EconomyResponse(0, 0, eco.bank(name).isMember(playerName)? ResponseType.SUCCESS : FAILURE, "");
}