pub struct Settings {Show 55 fields
pub enable_jmx_monitoring: bool,
pub rcon_port: u16,
pub level_seed: Option<i64>,
pub gamemode: Gamemode,
pub enable_command_block: bool,
pub enable_query: bool,
pub enforce_secure_profile: bool,
pub level_name: Option<String>,
pub motd: Option<String>,
pub query_port: u16,
pub pvp: bool,
pub generate_structures: bool,
pub max_chained_neighbor_updates: Option<i32>,
pub difficulty: Difficulty,
pub network_compression_threshold: i32,
pub max_tick_time: i64,
pub require_resource_pack: bool,
pub use_native_transport: bool,
pub max_players: u32,
pub online_mode: bool,
pub enable_status: bool,
pub allow_flight: bool,
pub initial_disabled_packs: Option<String>,
pub broadcast_rcon_to_ops: bool,
pub view_distance: u8,
pub server_ip: Option<Ipv4Addr>,
pub resource_pack_prompt: Option<String>,
pub allow_nether: bool,
pub server_port: u16,
pub enable_rcon: bool,
pub sync_chunk_writes: bool,
pub op_permission_level: u8,
pub prevent_proxy_connections: bool,
pub hide_online_players: bool,
pub resource_pack: Option<String>,
pub entity_broadcast_range_percentage: u8,
pub simulation_distance: u8,
pub rcon_password: Option<String>,
pub player_idle_timeout: i32,
pub force_gamemode: bool,
pub rate_limit: u32,
pub hardcore: bool,
pub white_list: bool,
pub broadcast_console_to_ops: bool,
pub spawn_npcs: bool,
pub spawn_animals: bool,
pub log_ips: bool,
pub function_permission_level: u8,
pub initial_enabled_packs: String,
pub level_type: WorldPreset,
pub spawn_monsters: bool,
pub enforce_whitelist: bool,
pub spawn_protection: u16,
pub resource_pack_sha1: Option<String>,
pub max_world_size: u32,
}
Fields§
§enable_jmx_monitoring: bool
§rcon_port: u16
§level_seed: Option<i64>
§gamemode: Gamemode
§enable_command_block: bool
§enable_query: bool
§enforce_secure_profile: bool
§level_name: Option<String>
§motd: Option<String>
§query_port: u16
§pvp: bool
§generate_structures: bool
§max_chained_neighbor_updates: Option<i32>
§difficulty: Difficulty
§network_compression_threshold: i32
§max_tick_time: i64
§require_resource_pack: bool
§use_native_transport: bool
§max_players: u32
§online_mode: bool
§enable_status: bool
§allow_flight: bool
§initial_disabled_packs: Option<String>
§broadcast_rcon_to_ops: bool
§view_distance: u8
§server_ip: Option<Ipv4Addr>
§resource_pack_prompt: Option<String>
§allow_nether: bool
§server_port: u16
§enable_rcon: bool
§sync_chunk_writes: bool
§op_permission_level: u8
§prevent_proxy_connections: bool
§hide_online_players: bool
§resource_pack: Option<String>
§entity_broadcast_range_percentage: u8
§simulation_distance: u8
§rcon_password: Option<String>
§player_idle_timeout: i32
§force_gamemode: bool
§rate_limit: u32
§hardcore: bool
§white_list: bool
§broadcast_console_to_ops: bool
§spawn_npcs: bool
§spawn_animals: bool
§log_ips: bool
§function_permission_level: u8
§initial_enabled_packs: String
§level_type: WorldPreset
§spawn_monsters: bool
§enforce_whitelist: bool
§spawn_protection: u16
§resource_pack_sha1: Option<String>
§max_world_size: u32
Implementations§
Source§impl Settings
impl Settings
pub fn new() -> Self
fn get_bool(config: &Properties, key: &str, default: bool) -> bool
fn get_u16(config: &Properties, key: &str, default: u16) -> u16
fn get_u32(config: &Properties, key: &str, default: u32) -> u32
fn get_u8(config: &Properties, key: &str, default: u8) -> u8
fn get_i32(config: &Properties, key: &str, default: i32) -> i32
fn get_i64(config: &Properties, key: &str, default: i64) -> i64
fn get_enum<T: FromStr>(config: &Properties, key: &str, default: T) -> T
fn get_optional_string(config: &Properties, key: &str) -> Option<String>
fn get_optional_i64(config: &Properties, key: &str) -> Option<i64>
fn get_optional_i32(config: &Properties, key: &str) -> Option<i32>
fn get_optional_ip(config: &Properties, key: &str) -> Option<Ipv4Addr>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more