Skip to content

Commit

Permalink
fix(pumpkin-core/src/permission): derive from JsonSchema if the featu…
Browse files Browse the repository at this point in the history
…re is active
  • Loading branch information
DataM0del committed Dec 28, 2024
1 parent 980f555 commit 3e3b895
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pumpkin-core/src/permission.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#[cfg(feature = "schemars")]
use schemars::JsonSchema;
use num_derive::{FromPrimitive, ToPrimitive};
use serde::{Deserialize, Deserializer, Serialize, Serializer};

Expand All @@ -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]
Expand Down

0 comments on commit 3e3b895

Please sign in to comment.