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 void
addPermission
(org.bukkit.entity.Player player, String node) Adds a permission to the playerstatic net.milkbowl.vault.economy.EconomyResponse
deposit
(org.bukkit.entity.Player player, double amount) static double
getBalance
(org.bukkit.entity.Player player) static Boolean
hasBalance
(org.bukkit.entity.Player player, double balance) static boolean
hasPermission
(org.bukkit.entity.Player player, String node) Checks whether the player has the permissionstatic boolean
Checks whether the Vault reference is valid with an economy pluginstatic boolean
Checks whether the Vault reference is valid with a permissions pluginstatic void
removePermission
(org.bukkit.entity.Player player, String node) Removes a permission from the playerstatic net.milkbowl.vault.economy.EconomyResponse
withdraw
(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)
-