Class LapisPermission


  • public class LapisPermission
    extends java.lang.Object
    This class is used to represent a setting that can be set for each permission
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getDefaultValue()
      Get the default state for this permission, definined in the plugin implementing it defaults to 0 if not set by plugin
      java.lang.String getName()
      Get the name of this permission
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LapisPermission

        public LapisPermission​(java.lang.String name)
        Create a permission with the given name
        Parameters:
        name - This name will be used to find values in the config.yml
      • LapisPermission

        public LapisPermission​(java.lang.String name,
                               int defaultValue)
        Overloads LapisPermission(String) with a default value
        Parameters:
        name - This name will be used to find values in the config.yml
        defaultValue - The value that this permission should default to, useful for complex permissions
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of this permission
        Returns:
        Returns the name of this permission
      • getDefaultValue

        public int getDefaultValue()
        Get the default state for this permission, definined in the plugin implementing it defaults to 0 if not set by plugin
        Returns:
        default value for permission
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object