Added setting() function

master
blackfur 2021-02-11 18:01:01 +01:00
parent 587d0e6a99
commit 29cbf6e4e4
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,7 @@ mod tests {
mc.set_block(position1,18,1);
mc.set_blocks(position1,position2,18,1);
println!("{}",mc.get_height(position1));
mc.setting("world_immutable", false);
}
}
@ -95,6 +96,10 @@ impl Minecraft {
fn restore_checkpoint(&mut self) {
self.conn.send("world.checkpoint.restore");
}
pub fn setting(&mut self, setting:&str, status:bool) {
self.conn.send(&format!("world.setting({},{})",setting,if status == true {1} else {0}));
}
}
pub fn create(adress:&str) -> Minecraft {