pumpkin-plugin-wit/v0.1/permission.wit
Alexander Medvedev 41d8c71c65 first commit
2026-05-19 17:43:50 +02:00

47 lines
1.6 KiB
Plaintext

interface permission {
/// Represents the player's permission level
///
/// Permission levels determine the player's access to commands and server operations.
/// Each numeric level corresponds to a specific role:
/// - `Zero`: `normal`: Player can use basic commands.
/// - `One`: `moderator`: Player can bypass spawn protection.
/// - `Two`: `gamemaster`: Player or executor can use more commands and player can use command blocks.
/// - `Three`: `admin`: Player or executor can use commands related to multiplayer management.
/// - `Four`: `owner`: Player or executor can use all of the commands, including commands related to server management.
enum permission-level {
zero,
one,
two,
three,
four,
}
/// Describes the default behavior for permissions
variant permission-default {
/// Permission is not granted by default
deny,
/// Permission is granted by default
allow,
/// Permission is granted by default to operators
op(permission-level),
}
/// A child permission entry
record permission-child {
node: string,
value: bool,
}
/// Defines a permission node in the system
record permission {
/// The full node name (e.g., "minecraft:command.gamemode")
node: string,
/// Description of what this permission does
description: string,
/// The default value of this permission
default: permission-default,
/// Children nodes that are affected by this permission
children: list<permission-child>,
}
}