github.com/df-mc/dragonfly@v0.9.13/server/doc.go (about) 1 // Package server implements a high-level implementation of a Minecraft server. 2 // Creating such a server may be done using the `server.New()` function. 3 // Additional configuration may be passed by using server.Config{...}.New(). 4 // `Server.Listen()` may be called to start and run the server. It should be 5 // followed up by a loop as such: 6 // 7 // for srv.Accept(nil) { 8 // } 9 // 10 // `Server.Accept()` blocks until a new player connects to the server and 11 // spawns in the default world, and calls the function passed to it once this 12 // happens. If `Server.Accept()` returns false, this means the server was 13 // closed. 14 package server