Class LapisPermission
- java.lang.Object
-
- net.lapismc.lapiscore.permissions.LapisPermission
-
public class LapisPermission extends java.lang.ObjectThis class is used to represent a setting that can be set for each permission
-
-
Constructor Summary
Constructors Constructor Description LapisPermission(java.lang.String name)Create a permission with the given nameLapisPermission(java.lang.String name, int defaultValue)OverloadsLapisPermission(String)with a default value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDefaultValue()Get the default state for this permission, definined in the plugin implementing it defaults to 0 if not set by pluginjava.lang.StringgetName()Get the name of this permissionjava.lang.StringtoString()
-
-
-
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)OverloadsLapisPermission(String)with a default value- Parameters:
name- This name will be used to find values in the config.ymldefaultValue- 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:
toStringin classjava.lang.Object
-
-