From 3e3b89583d7fc2d57f6e2539bc5361b554bd6f0f Mon Sep 17 00:00:00 2001 From: DataM0del <183248792+DataM0del@users.noreply.github.com> Date: Sat, 28 Dec 2024 13:48:40 -0500 Subject: [PATCH] fix(pumpkin-core/src/permission): derive from JsonSchema if the feature is active --- pumpkin-core/src/permission.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pumpkin-core/src/permission.rs b/pumpkin-core/src/permission.rs index 7229cbcb..6fd198df 100644 --- a/pumpkin-core/src/permission.rs +++ b/pumpkin-core/src/permission.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "schemars")] +use schemars::JsonSchema; use num_derive::{FromPrimitive, ToPrimitive}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; @@ -11,6 +13,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; /// - `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. #[derive(FromPrimitive, ToPrimitive, Clone, Copy, Default, PartialEq, Eq)] +#[cfg_attr(feature = "schemars", derive(JsonSchema))] #[repr(i8)] pub enum PermissionLvl { #[default]