Class PermissionProvider


  • public abstract class PermissionProvider
    extends java.lang.Object
    This class provides information about if a player has a permission or not. It is also thought to work as communication between the permission plugin and this plugin for more things then just the permissions. Like in a custom version for a special permission plugin as provider for the display name.
    • Constructor Detail

      • PermissionProvider

        public PermissionProvider()
        Sets the new instance of this class to the instance which is returned if getInstance() is called.
    • Method Detail

      • getInstance

        public static PermissionProvider getInstance()
        Returns:
        Returns the instance of the PermissionProvider. There can always only be one PermissionProvider
      • hasPermission

        public abstract boolean hasPermission​(PAFPlayer pPlayer,
                                              java.lang.String pPermission)
        Parameters:
        pPlayer - The player for whom the permission is asked
        pPermission - The permission which is asked for
        Returns:
        Returns true if the given player has the given permission and returns false if he has not.