steakteam / CHVault

A CommandHelper extension providing access to Vault's API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CHVault

A CommandHelper extension providing access to Vault's API.

Download the correct version for your version of CommandHelper:
CH 3.3.1-Snapshot (Old version)
CH 3.3.1 (Release) (You probably want this one)
CH 3.3.2-Snapshot (Dev builds)

Functions

Permissions

Uses Vault to extend the potential of permissions checking with group and multiworld support.

boolean vault_has_permission(player, permission, [world]);

Checks the permission value of a player, optionally in a specific world. When used on an offline player, the accuracy depends on the permission plugin.

array vault_pgroup(player, [world]);

Returns an array of groups that the player is in. When used on offline players, the accuracy of this function is dependent on the permissions plugin.

Chat

string vault_group_prefix(world, group);

Returns the prefix of group in world.

string vault_group_suffix(world, group);

Returns the suffix of group in world.

string vault_user_prefix(world, user);

Returns the prefix of user in world. Accuracy is plugin dependent if user is not online.

string vault_user_suffix(world, user);

Returns the suffix of user in world. Accuracy is plugin dependent if user is not online.

Economy

Provides functions to hook into the server's economy plugin. To use any of these functions, you must have one of the following economy plugins installed: iConomy 4,5,6, BOSEconomy 6 & 7, EssentialsEcon, 3Co, MultiCurrency, MineConomy, eWallet, EconXP, CurrencyCore, CraftConomy. In addition, you must download the Vault plugin. Beyond this, there is no special setup to get the economy functions working, assuming they work for you in game using the plugin's default controls. Bank controls may not be supported in your particular plugin, check the details of that particular plugin.

void acc_add(account_name, to_add):

Adds an amount to the specified account

double acc_balance(account_name):

Returns the balance of the given account name.

void acc_divide(account_name, to_divide):

Divides the account by the given amount

void acc_multiply(account_name, to_multiply):

Multiplies the account balance by the given amount

void acc_remove(account_name):

Removes the specified account from the game - Currently unimplemented, due to lack of support in Vault. Calling this function will currently always throw an exception.

void acc_set(account_name, value):

Sets the account's balance to the given amount

void acc_subtract(account_name, to_subtract):

Subtracts the given amount from the specified account

void bacc_add(bank_name, value):

Adds the specified amount to the bank account's balance

void bacc_balance(bank_name):

Gets the specified bank account's balance

void bacc_divide(bank_name, value):

Divides the bank account's balance by the given value

void bacc_multiply(bank_name, value):

Multiplies the given bank account's balance by the given value

void bacc_remove(bank_name):

Removes the given bank account from the game

void bacc_set(bank_name, value):

Sets the bank account's balance to the given amount

void bacc_subtract(bank_name, value):

Subtracts the specified amount from the bank account's balance

About

A CommandHelper extension providing access to Vault's API


Languages

Language:Java 100.0%