chore: move to crates folder

This commit is contained in:
Alexander Medvedev committed 2026-08-06 12:56:40 +02:00
1 parent 5d10c0d8a8
commit cb3660bcd2
3393 files changed
+1270 -741

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
use pumpkin_util::permission::PermissionLvl;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
/// Represents an operator (admin) on the server.
///
/// Includes their UUID, name, permission level, and whether they bypass the player limit.
#[derive(Serialize, Deserialize, Clone, Default)]
pub struct Op {
/// The UUID of the operator.
pub uuid: Uuid,
/// The name of the operator.
pub name: String,
/// The permission level assigned to this operator.
pub level: PermissionLvl,
/// Whether this operator bypasses the server's player limit.
pub bypasses_player_limit: bool,
}
impl Op {
/// Creates a new operator with the given properties.
///
/// # Arguments
/// * `uuid` – The UUID of the operator.
/// * `name` – The name of the operator.
/// * `level` – The permission level assigned to the operator.
/// * `bypasses_player_limit` – Whether the operator can bypass the server's player limit.
#[must_use]
pub const fn new(
uuid: Uuid,
name: String,
level: PermissionLvl,
bypasses_player_limit: bool,
) -> Self {
Self {
uuid,
name,
level,
bypasses_player_limit,
}
}
}