Class CyberVaultUtils

java.lang.Object
com.github.cyberryan1.cybercore.spigot.utils.CyberVaultUtils

public class CyberVaultUtils extends Object
Vault utilities
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static net.milkbowl.vault.chat.Chat
     
    static net.milkbowl.vault.economy.Economy
     
    static net.milkbowl.vault.permission.Permission
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes Vault permissions and chat
    CyberVaultUtils(boolean useEconomy)
    Initializes Vault permissions and chat.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getPlayerPrefix(org.bukkit.entity.Player player)
    Gets a player's prefix
    static String
    getPlayerPrefix(org.bukkit.OfflinePlayer player)
    Gets an offline player's prefix
    static String
    getPlayerSuffix(org.bukkit.entity.Player player)
    Gets a player's suffix
    static String
    getPlayerSuffix(org.bukkit.OfflinePlayer player)
    Gets an offline player's suffix
    static net.milkbowl.vault.chat.Chat
     
    static net.milkbowl.vault.economy.Economy
     
    static net.milkbowl.vault.permission.Permission
     
    static boolean
    hasPerms(org.bukkit.command.CommandSender sender, String perm)
    Checks if a command sender has a certain permission
    static boolean
    hasPerms(org.bukkit.entity.Player player, String perm)
    Checks if the given player has the given permission
    static boolean
    hasPerms(org.bukkit.OfflinePlayer player, String perm)
    Checks if an offline player has a certain permission

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static boolean hasPerms(org.bukkit.entity.Player player, String perm)
      Checks if the given player has the given permission
      Parameters:
      player - The Player to check
      perm - The permission
      Returns:
      True if the player has the permission, false otherwise
    • hasPerms

      public static boolean hasPerms(org.bukkit.command.CommandSender sender, String perm)
      Checks if a command sender has a certain permission
      Parameters:
      sender - The CommandSender to check
      perm - The permission
      Returns:
      True if the sender has the permission, false otherwise
    • hasPerms

      public static boolean hasPerms(org.bukkit.OfflinePlayer player, String perm)
      Checks if an offline player has a certain permission
      Parameters:
      player - The OfflinePlayer to check
      perm - The permission
      Returns:
      True if the player has the permission, false otherwise
    • getPlayerPrefix

      public static String getPlayerPrefix(org.bukkit.entity.Player player)
      Gets a player's prefix
      Parameters:
      player - The Player to get the prefix of
      Returns:
      The player's prefix
    • getPlayerSuffix

      public static String getPlayerSuffix(org.bukkit.entity.Player player)
      Gets a player's suffix
      Parameters:
      player - The Player to get the suffix of
      Returns:
      The player's suffix
    • getPlayerPrefix

      public static String getPlayerPrefix(org.bukkit.OfflinePlayer player)
      Gets an offline player's prefix
      Parameters:
      player - The OfflinePlayer to get the prefix of
      Returns:
      The player's prefix
    • getPlayerSuffix

      public static String getPlayerSuffix(org.bukkit.OfflinePlayer player)
      Gets an offline player's suffix
      Parameters:
      player - The OfflinePlayer to get the suffix of
      Returns:
      The player's suffix