Moved config into its own crate

This commit is contained in:
DaniD3v committed 2024-08-31 19:38:47 +02:00
1 parent a17ed23b00
commit 070a50833b
21 files changed
+48 -29

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize)]
pub struct PVPConfig {
/// Is PVP enabled ?
pub enabled: bool,
/// Do we want to have the Red hurt animation & fov bobbing
pub hurt_animation: bool,
/// Should players in creative be protected against PVP
pub protect_creative: bool,
/// Has PVP Knockback?
pub knockback: bool,
/// Should player swing when attacking?
pub swing: bool,
}
impl Default for PVPConfig {
fn default() -> Self {
Self {
enabled: true,
hurt_animation: true,
protect_creative: true,
knockback: true,
swing: true,
}
}
}