Package studio.magemonkey.fabled.hook
Class VaultHook
java.lang.Object
studio.magemonkey.fabled.hook.VaultHook
Manages setting permissions through vault
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPermission(org.bukkit.entity.Player player, String node) Adds a permission to the playerstatic net.milkbowl.vault.economy.EconomyResponsedeposit(org.bukkit.entity.Player player, double amount) static doublegetBalance(org.bukkit.entity.Player player) static BooleanhasBalance(org.bukkit.entity.Player player, double balance) static booleanhasPermission(org.bukkit.entity.Player player, String node) Checks whether the player has the permissionstatic booleanChecks whether the Vault reference is valid with an economy pluginstatic booleanChecks whether the Vault reference is valid with a permissions pluginstatic voidremovePermission(org.bukkit.entity.Player player, String node) Removes a permission from the playerstatic net.milkbowl.vault.economy.EconomyResponsewithdraw(org.bukkit.entity.Player player, double amount)
-
Constructor Details
-
VaultHook
public VaultHook()
-
-
Method Details
-
isPermissionsValid
public static boolean isPermissionsValid()Checks whether the Vault reference is valid with a permissions plugin- Returns:
- true if valid, false otherwise
-
addPermission
Adds a permission to the player- Parameters:
player- player to add tonode- permission node to add
-
removePermission
Removes a permission from the player- Parameters:
player- player to remove fromnode- permission node to remove
-
hasPermission
Checks whether the player has the permission- Parameters:
player- player to check fornode- permission node to remove- Returns:
- true if the player has it, false otherwise
-
isEconomyValid
public static boolean isEconomyValid()Checks whether the Vault reference is valid with an economy plugin- Returns:
- true if valid, false otherwise
-
getBalance
public static double getBalance(org.bukkit.entity.Player player) -
hasBalance
-
withdraw
public static net.milkbowl.vault.economy.EconomyResponse withdraw(org.bukkit.entity.Player player, double amount) -
deposit
public static net.milkbowl.vault.economy.EconomyResponse deposit(org.bukkit.entity.Player player, double amount)
-