Skip to content

Register Permissions

Potato Destroyer / liuyipeng001 edited this page Feb 16, 2018 · 1 revision

registerPermissions

registerPermissions {
	permission("test.test") {
		defaultValue = PermissionDefault.FALSE
		description = "Nobody has that!"
		childPermission("a") {
			defaultValue = PermissionDefault.NOT_OP
			childPermission("xxx") {
				childPermission("xxx")
			}
		}
	}
}

This function provides DSL to register permissions.

Permission

Using this function to declare a permission, this DSL have these parameters:

  • defaultValue (default is OP)
  • description (default is empty)
  • childPermission

Those of them are option.(All DSL like this)
You can define a child permission of a child permission of a child permission of.........
Have fun 😄

Clone this wiki locally