Giter VIP home page Giter VIP logo

ninticore's Introduction

NintiCore

Core library mod for other mods. Includes a node-based permissions system.

Permissions system

Mods may check whether players have given permissions and possibly what string (if any) is passed as an argument to a permission. This may be used for restricting access to certain functions of mods to given players in a way that's more flexible than simply opping or not opping players.

Format

Individual permissions are dot-separated nodes. Permissions are considered to cover all other permissions that start in the same nodes. (e.g. "first.second" covers "first.second.third")

Permissions may be suffixed with ".*" to cover all sub-permissions, but not the permission itself. (e.g. "first.second.*" covers "first.second.third", but not "first.second")

* refers to all permissions.

Permissions may be collated into groups, which may be assigned to players or other groups. A player or group will then be considered to "have" all of the permissions of that group, although their own permissions will override it. Groups are assigned to groups or players in the permissions files as though it were a permission prefixed with "#".

A permission group possibly listed in the permissions file as * is the default group from which all players draw permissions, being overridden by their own permissions and the permissions of any group assigned to them.

Permissions may be negated by prefixing them with "-", which may be used to deny a permission to a player or group that would otherwise have it due to the groups assigned to it or the default permissions.

Permissions may be following by a ":" followed by any arbitrary string. This is a permission argument, which can be accessed by any mods checking for it. A permission argument may be spread across multiple lines, by indenting the following line (and all succeeding lines until the end of the permission argument) by at least 4 spaces more than the permission it's a permission argument of.

Example

Example to be added at a later date.

Commands

  • permissions save
    • Saves the current state of the permissions registry to file.
  • permissions load
    • Loads the contents of the permissions registry file, overwriting the current contents of the permissions registry.
  • permissions initialise blank
    • Wipes the permissions registry
  • permissions initialise presets
    • Wipes the permissions registry and replaces the contents with the contents suggested by this and other mods.
  • permissions list [playername or group name]
    • Lists the permissions of a player or group.
  • permissions listgroups
    • Lists all groups in the permissions registry.
  • permissions add [playername or group id] [permission as string]
    • Adds the given permission to the player or group. If the player or group already has the given permission directly, replaces it. This may allow you to replace the permission argument of a permission with a different one.
  • permissions remove [playername or group id] [permission as string]
    • Removes the given permission from the player or group. The player or group may still have the given permission from a group.
  • permissions has [playername or group id] [permission as string]
    • Checks whether or not the player or group has the given permission.
  • permissions help
    • Gets help related to permissions.

Permissions

`ninti.permissions.read.players`

Allows you to read permissions information about players.

`ninti.permissions.read.groups`

Allows you to read permissions information about groups.

`ninti.permissions.write.players`

Allows you to modify permissions for players.

`ninti.permissions.write.groups`

Allows you to modify permissions for groups.

`ninti.permissions.files.save`

Allows you to save the permissions registry to file.

`ninti.permissions.files.load`

Allows you to load the permissions registry from file, overwriting the current contents.

Requirements

Includes (not requiring them to be included separately):

ninticore's People

Contributors

c-massie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.