当前位置: 首页>>代码示例>>Java>>正文


Java ResponseType.NOT_IMPLEMENTED属性代码示例

本文整理汇总了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);
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:9,代码来源:VaultConnector.java

示例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)");
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:9,代码来源:VaultConnector.java

示例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);
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:7,代码来源:VaultConnector.java

示例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 );
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:10,代码来源:VaultConnector.java

示例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);
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:10,代码来源:VaultConnector.java

示例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);
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:10,代码来源:VaultConnector.java

示例7: getBalance

@Override
public double getBalance() {
    EconomyResponse response = _economy.bankBalance(_name);
    if (response.type == ResponseType.NOT_IMPLEMENTED)
        throw new UnsupportedOperationException();

    return response.amount;
}
 
开发者ID:JCThePants,项目名称:NucleusFramework,代码行数:8,代码来源:VaultBank.java

示例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;
}
 
开发者ID:JCThePants,项目名称:NucleusFramework,代码行数:10,代码来源:VaultBank.java

示例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();
}
 
开发者ID:JCThePants,项目名称:NucleusFramework,代码行数:30,代码来源:VaultBank.java

示例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, "");
}
 
开发者ID:Realmcraft,项目名称:Vault,代码行数:13,代码来源:Economy_GoldIsMoney2.java

示例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, "");
}
 
开发者ID:Realmcraft,项目名称:Vault,代码行数:10,代码来源:Economy_GoldIsMoney2.java

示例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, "");
}
 
开发者ID:Realmcraft,项目名称:Vault,代码行数:13,代码来源:Economy_GoldIsMoney2.java

示例13: notImplementedBank

private EconomyResponse notImplementedBank() {
	return new EconomyResponse(0, 0, ResponseType.NOT_IMPLEMENTED, "Jecon does not support bank.");
}
 
开发者ID:HimaJyun,项目名称:Jecon,代码行数:3,代码来源:VaultEconomy.java

示例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, "");
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:5,代码来源:VaultConnector.java

示例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, "");
}
 
开发者ID:sakunc,项目名称:Gringotts-,代码行数:5,代码来源:VaultConnector.java


注:本文中的net.milkbowl.vault.economy.EconomyResponse.ResponseType.NOT_IMPLEMENTED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。