pub struct RuntimeConfig {Show 20 fields
pub max_players: u32,
pub view_distance: u8,
pub simulation_distance: u8,
pub max_chained_neighbor_updates: i32,
pub online_mode: bool,
pub auth_server: Option<String>,
pub profile_server: Option<String>,
pub encryption: bool,
pub allow_flight: bool,
pub motd: String,
pub use_favicon: bool,
pub favicon: String,
pub enforce_secure_chat: bool,
pub chat_spam_threshold_seconds: i32,
pub command_spam_threshold_seconds: i32,
pub compression: Option<CompressionInfo>,
pub server_links: Option<ServerLinks>,
pub packet_workers: Option<usize>,
pub chunk_generation_threads: Option<usize>,
pub chunk_encoding_threads: Option<usize>,
}Expand description
Runtime server configuration — the subset of settings needed after startup.
Stored on Server and accessed by game logic at runtime.
Fields§
§max_players: u32The maximum number of players that can be on the server at once.
view_distance: u8The view distance of the server.
simulation_distance: u8The simulation distance of the server.
max_chained_neighbor_updates: i32Maximum queued neighbor-update tasks in one chained run; negative means unlimited.
online_mode: boolWhether the server is in online mode.
auth_server: Option<String>Optional authentication endpoint for online-mode hasJoined checks.
profile_server: Option<String>Optional endpoint for online-mode player name-to-profile lookups.
encryption: boolWhether the server should use encryption. Required in online mode.
allow_flight: boolWhether vanilla floating/flying movement checks permit unauthorized flight.
motd: StringThe message of the day.
use_favicon: boolWhether to use a favicon.
favicon: StringThe path to the favicon.
enforce_secure_chat: boolWhether to enforce secure chat.
chat_spam_threshold_seconds: i32Vanilla chat spam threshold window in seconds
command_spam_threshold_seconds: i32Vanilla command spam threshold window in seconds
compression: Option<CompressionInfo>The compression settings for the server.
server_links: Option<ServerLinks>All settings and configurations for server links.
packet_workers: Option<usize>Optional count of persistent inter-tick gameplay packet workers.
chunk_generation_threads: Option<usize>Optional worker count for the Rayon chunk generation pool.
chunk_encoding_threads: Option<usize>Optional worker count for the Rayon chunk encoding pool.
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn server_links_packet(&self) -> Option<CServerLinks>
pub fn server_links_packet(&self) -> Option<CServerLinks>
Builds the CServerLinks packet from config, if server links are enabled.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>