Pumpkin/pumpkin-config/src/pvp.rs
2024-08-31 19:38:47 +02:00

28 lines
689 B
Rust

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,
}
}
}