Add default values for config

This commit is contained in:
lukas0008 committed 2024-10-11 16:59:59 +02:00
1 parent 9ac4bdbd50
commit 5adaf5aa17
10 files changed
+108 -17

No files matched your search

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