pub enum Gamemode {
Survival = 0,
Creative = 1,
Adventure = 2,
Spectator = 3,
}Expand description
A Minecraft game mode.
Used by Context::set_gamemode
and the /gamemode command. Maps directly to the protocol values
sent in the GameStateChange packet (reason = 3).
Variants§
Survival = 0
Survival mode (id 0): resource gathering, health, hunger.
Creative = 1
Creative mode (id 1): unlimited resources, flight, no damage.
Adventure = 2
Adventure mode (id 2): survival with block interaction restrictions.
Spectator = 3
Spectator mode (id 3): invisible, fly through blocks, no interaction.
Implementations§
Trait Implementations§
impl Copy for Gamemode
impl Eq for Gamemode
impl StructuralPartialEq for Gamemode
Auto Trait Implementations§
impl Freeze for Gamemode
impl RefUnwindSafe for Gamemode
impl Send for Gamemode
impl Sync for Gamemode
impl Unpin for Gamemode
impl UnsafeUnpin for Gamemode
impl UnwindSafe for Gamemode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.