Class CyberVaultUtils
java.lang.Object
com.github.cyberryan1.cybercore.spigot.utils.CyberVaultUtils
Vault utilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic net.milkbowl.vault.chat.Chat
static net.milkbowl.vault.economy.Economy
static net.milkbowl.vault.permission.Permission
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes Vault permissions and chatCyberVaultUtils
(boolean useEconomy) Initializes Vault permissions and chat. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getPlayerPrefix
(org.bukkit.entity.Player player) Gets a player's prefixstatic String
getPlayerPrefix
(org.bukkit.OfflinePlayer player) Gets an offline player's prefixstatic String
getPlayerSuffix
(org.bukkit.entity.Player player) Gets a player's suffixstatic String
getPlayerSuffix
(org.bukkit.OfflinePlayer player) Gets an offline player's suffixstatic net.milkbowl.vault.chat.Chat
static net.milkbowl.vault.economy.Economy
static net.milkbowl.vault.permission.Permission
static boolean
Checks if a command sender has a certain permissionstatic boolean
Checks if the given player has the given permissionstatic boolean
Checks if an offline player has a certain permission
-
Field Details
-
vaultPermissions
public static net.milkbowl.vault.permission.Permission vaultPermissions -
vaultChat
public static net.milkbowl.vault.chat.Chat vaultChat -
vaultEconomy
public static net.milkbowl.vault.economy.Economy vaultEconomy
-
-
Constructor Details
-
CyberVaultUtils
public CyberVaultUtils()Initializes Vault permissions and chat -
CyberVaultUtils
public CyberVaultUtils(boolean useEconomy) Initializes Vault permissions and chat. If useEconomy is true, Vault economy is initialized as well.- Parameters:
useEconomy
- Whether to initialize Vault economy
-
-
Method Details
-
getVaultPermissions
public static net.milkbowl.vault.permission.Permission getVaultPermissions()- Returns:
- The Vault permissions object
-
getVaultChat
public static net.milkbowl.vault.chat.Chat getVaultChat()- Returns:
- The Vault chat object
-
getVaultEconomy
public static net.milkbowl.vault.economy.Economy getVaultEconomy()- Returns:
- The Vault economy object
-
hasPerms
Checks if the given player has the given permission- Parameters:
player
- ThePlayer
to checkperm
- The permission- Returns:
- True if the player has the permission, false otherwise
-
hasPerms
Checks if a command sender has a certain permission- Parameters:
sender
- TheCommandSender
to checkperm
- The permission- Returns:
- True if the sender has the permission, false otherwise
-
hasPerms
Checks if an offline player has a certain permission- Parameters:
player
- TheOfflinePlayer
to checkperm
- The permission- Returns:
- True if the player has the permission, false otherwise
-
getPlayerPrefix
Gets a player's prefix- Parameters:
player
- ThePlayer
to get the prefix of- Returns:
- The player's prefix
-
getPlayerSuffix
Gets a player's suffix- Parameters:
player
- ThePlayer
to get the suffix of- Returns:
- The player's suffix
-
getPlayerPrefix
Gets an offline player's prefix- Parameters:
player
- TheOfflinePlayer
to get the prefix of- Returns:
- The player's prefix
-
getPlayerSuffix
Gets an offline player's suffix- Parameters:
player
- TheOfflinePlayer
to get the suffix of- Returns:
- The player's suffix
-