Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 958 Bytes

README.md

File metadata and controls

47 lines (33 loc) · 958 Bytes

bedrock-server

This repository is a MCPE Server software which uses bedrock-rs crate.

Feel free to join our Discord Server to ask questions/discute with contributors/enthusiasts.

Installation

Use the example to setup your server.

Cargo.toml

[package]
name = "server"
version = "0.1.0"
edition = "2021"

[dependencies]
bedrock-server = { git = "https://github.com/bedrock-crustaceans/bedrock-server" }
tokio = "1.41.1"

main.rs

use std::net::SocketAddr;
use bedrock_server::server::builder::ServerBuilder;

#[tokio::main]
async fn main() {
    let mut server = ServerBuilder::new()
        .name("Server")
        .sub_name("bedrock-rs")
        .listener(SocketAddr::new("127.0.0.1".parse().unwrap(), 19132))
        .build()
        .await;
    
    server.start().await;

    loop {
        
    }
    
    server.stop().await;
}