A Minecraft server and proxy written from scratch in Swift.
NOTICE: This swift package is in active development, so the code may build with warnings or errors
Clone the repository and start the server
git clone https://github.com/GroupeMINASTE/SwiftMC.git
cd SwiftMC
swift run -c release
Add SwiftMC to the dependencies of your swift executable package:
.package(url: "https://github.com/GroupeMINASTE/SwiftMC.git", from: "0.0.1")
Create a server:
import SwiftMC
// Initialize a server
let server = SwiftMC()
// And start it
DispatchQueue.global().async {
server.start()
}
// Read commands from console
while let input = readLine(strippingNewline: true) {
server.dispatchCommand(command: input)
}
See DOCUMENTATION.md for a full documentation of all available features to customize your server.