Minecraft Bedrock Edition server software written in Go




Dragonfly is a heavily asynchronous server software for Minecraft Bedrock Edition written in Go. It was written with scalability and simplicity in mind and aims to make the process of setting up a server and modifying it easy. Unlike other Minecraft server software, Dragonfly is generally used as a library to extend.

Discord Banner 2

Getting started

Running Dragonfly requires at least Go 1.16. After starting the server through one of the methods below, ctrl+c may be used to shut down the server. Also check out the wiki for more detailed info.

Installation as library

go mod init github.com/
go get github.com/df-mc/dragonfly



Installation of the latest commit

git clone https://github.com/df-mc/dragonfly
cd dragonfly
go run main.go


Developer info

Go Reference

Dragonfly features a well-documented codebase with an easy-to-use API. Documentation may be found here and in the subpackages found by clicking Directories.

Publishing your project on GitHub? Consider adding the #df-mc topic to your repository to improve visibility of your project.


Contributions are very welcome! Issues, pull requests and feature requests are highly appreciated. Opening a pull request? Consider joining our Discord server to discuss your changes! Also have a read through the CONTRIBUTING.md for more info.

  • Standard for Dragonfly  module

    Standard for Dragonfly module


    Reusing someone else's code is good programming practice.

    It will be great if the Dragonfly developers, who do not want to add their changes to the Dragonfly code (for various reasons), will create their add-ons according to some standard. For example using the "plugin" package.

    My suggestion

    When I want to write a separate module for Dragonfly, I make a separate package with init functions. Then, in main.go, I import the modules I need using the "stub"

    What's you mind about it? Wait for comments

    opened by ghost 12
  • Implement AdventureSettings & PlayerSkin packet & Sandstone

    Implement AdventureSettings & PlayerSkin packet & Sandstone


    • Handle the AdventureSettings packet
    • Flying related functions
    • Added player scaling
    • Added updating player skin
    • Handle the PlayerSkin packet (So other players see when you change your skin ingame)
    • Implemented Sandstone
    opened by Suremeo 8
  • Implement projectiles

    Implement projectiles

    There's no projectile on DF for the moment and.. for servers like mine where pvp is based on splashing potions we're kind of stuck and can't really release my server.

    opened by RestartFU 7
  • Commands are resent after the player leaves

    Commands are resent after the player leaves

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xa153d1]
    goroutine 95 [running]:
    github.com/df-mc/dragonfly/server/cmd.Command.Runnables({{0xc000c4c018, 0x1, 0x1}, {0xc75362, 0x8}, {0xc8b109, 0x26}, {0xc0005f5540, 0x39}, {0x0, ...}}, ...)
            /root/go/pkg/mod/github.com/df-mc/[email protected]/server/cmd/command.go:205 +0xe4
    github.com/df-mc/dragonfly/server/session.(*Session).resendCommands(0xc000a87a00, 0xc0022ef470)
            /root/go/pkg/mod/github.com/df-mc/[email protected]/server/session/command.go:130 +0x198
    github.com/df-mc/dragonfly/server/session.(*Session).sendCommands(0xc0005f6000, 0xc0003bc4e0)
            /root/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:337 +0x179
    created by github.com/df-mc/dragonfly/server/session.(*Session).handlePackets
            /root/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:275 +0x165
    exit status 2
    opened by Prim69 6
  • Rejoining a server crashes the client

    Rejoining a server crashes the client

    Whenever I join my df server, and then disconnect and rejoin my client will crash after a few seconds. This does not seem to happen if I first restart the server before rejoining.

    mc: v1.18.0.2 windows 10 edition df version: commit 355b5b4aa373a4f853d967d675f91bef438ee57c

    opened by AndreasHGK 6
  • add command.Allow() function

    add command.Allow() function

    As mentioned in the documentation of the function, this function essentially checks if the source can use at least one of the Runnables of the command. An important use for this is for example checking whether or not a command should be included in a /help command (if you implement a custom version of this) Another use could be for example if you have a commandSpy feature and you want to exclude commands that the player does not have access to.

    Currently there is already a way to check this that does essentially the same by checking if len(command.Params(source)) == 0 but I do not think that is very intuitive in my opinion.

    opened by AndreasHGK 6
  • Some items are sometimes incorrect in the inventory

    Some items are sometimes incorrect in the inventory

    Sometimes, some of the items displayed in the (creative) inventory are incorrect. In such cases, honeycombs are displayed as a bottle of honey, warped fungus on a sticks are displayed as chains. (Potentially more of such items.)

    This was reproduced both by me and @DaPigGuy. It seems to fix itself automatically when leaving and joining again. Maybe something wrong with the item runtime IDs. I am not sure what could be the cause of this. Item runtime IDs are consistent for as long as the server is running (and technically even afterwards). Multiple players can experience and not experience the bug simultaneously.

    opened by Sandertv 6
  • Missing block aliases for stone slabs

    Missing block aliases for stone slabs

    i got this error while start the server ERRO[0000] load chunk: failed loading (23, 21): cannot get runtime ID of block state minecraft:stone_slab{map[stone_slab_type:quartz top_slot_bit:0]} dimension=overworld and it does not even fixed when i load the world in vanilla then load it in df again

    opened by ZStarMCZ5487 5
  • HandleQuit() sometimes gets called multiple times

    HandleQuit() sometimes gets called multiple times

    For a while I've been having some problems with HandleQuit, so I added a fmt.Println("Handling quit for", s.Player().Name()), and as I suspected I got the following output:

    INFO[0057] Server shutting down...
    DEBU[0057] Disconnecting players...
    Handling quit for AndreasHGK
    Handling quit for AndreasHGK
    panic: player AndreasHGK does not yet have a session

    I dont think my code has anything to do with it tho, as I've experienced errors when handling quit on completely different projects before but was never able to find the bug (until now). I think this bug has existed for multiple months Most of the time the event works correctly, but other times it seems to call HandleQuit() twice. I'm not exactly sure when it happens.

    The last time it happened it was when i used crtl+c to close the server. This also doesn't seem to 100% reliably cause it to happen tho, in fact usually it doesnt happen so I am clueless as to why or when exactly it happens.

    opened by AndreasHGK 5
  • player.Player.Inventory().SetItem() on server.Server.Accept()

    player.Player.Inventory().SetItem() on server.Server.Accept()


    DEBU[0092] failed processing packet from 
    x.x.x.x:55750 (Endermanbugzjfc): *packet.InventoryTransaction: unhandled inventory transaction type *protocol.MismatchTransactionData
    • Expected result: Item got set and inventory is synchronous between server and client
    • Actual result: The error sometimes occur, depending on the network, delay of code execution, and of course luck


    Run player.Player.Inventory().SetItem() right after server.Server.Accept()


    • DragonFly: 0.1.0 4b13a4f305dfb7b9f9b6109955ba81f816844267
    • OS: macOS Big Sur (Intel) version 11.4
    • Network: Shitty school WiFi
    • Go: 1.16
    • Client: 1.17.2
    opened by Endermanbugzjfc 5
  • Bug Block Disappearing

    Bug Block Disappearing

    When standing too close to a block while placing it the placed block disappear, tested in the latest df version

    Video: https://streamable.com/hdzdo8 Video2: https://streamable.com/thcyem Video3: https://streamable.com/45xnxd

    opened by ProtectorYT364 3
  • Implemented functional anvils

    Implemented functional anvils

    • [ ] Renaming (Find the best way to do this)
    • [ ] item.Repairable implementations (Also find the best way to do this)
    • [ ] Falling anvil damage and noises
    • [ ] Better alternative to (Direction).Horizontal()

    Closes #521

    opened by T14Raptor 0
Writing Go server software for Minecraft Bedrock Edition
mcstatusgo is a pure Go Minecraft service status checker for Java edition Minecraft servers

mcstatusgo is a pure Go Minecraft service status checker for Java edition Minecraft servers. mcstatusgo supports requesting information through the status and query protocols.

Milad Noorzaie 2 May 19, 2022
Minecraft server made in go, faster and better!

ElytraGo Minecraft server made in go, faster and better! Project is in early stage, but I'm trying continuously update it with new lines of code :)) L

Michał Kowal 30 Apr 22, 2022
Minecraft server implementation using Golang

Deepslate Deepslate is a Minecraft server implementation in Go. Deepslate if WIP and currently not available for installation Goals First implementati

virusbear 1 Nov 19, 2021
Go Minecraft Client

Steven Not actively maintained anymore A work in progress Minecraft client in Go. Don't expect it to go anywhere, just doing this for fun. Images Buil

Matthew Collins 281 Jun 20, 2022
⛏ 🐹 Minecraft Protocol implementation in Go

illustration by @talentlessguy Install Go 1.16.x is required to use this library go get github.com/BRA1L0R/go-mcproto Opening a connection client := m

Pietro Tamilia 30 Jun 19, 2022
Quick and dirty Minecraft player head to SVG converter

Head SVG Quick and dirty Minecraft player head to SVG converter. Can be used to generate player head icons. Usage usage: Head SVG [-h|--help] -n|--nam

PotatoMaster101 1 May 29, 2022
Tetra3D is a 3D software renderer written in Go and Ebiten and made for games.

Tetra3D Tetra3D Docs Support If you want to support development, feel free to check out my itch.io / Steam / Patreon. I also have a Discord server her

SolarLune 242 Jun 21, 2022
a framework in golang for game server or app server

einx a framework in golang for game server or app server. a example server for einx (https://github.com/Cyinx/game_server_einx) Features User-Friendly

Cyinx 403 Jun 16, 2022
A lightweight and efficient messaging gateway server for distributed game servers, written in Go.

Overview channeld is an open source, light-weight and efficient messaging gateway server designed for distributed game servers (typically MMO) and oth

Sang Tian 9 May 9, 2022
Online multiplayer board game server written in Go, using WebSockets.

BfH Server The Battle for Hermannia is a board game created as a gift by the father of hermannm, a developer of this project. This digital edition of

null 8 Jun 1, 2022
A Game Server Skeleton in golang.

A game server skeleton implemented with golang. 注意(NOTICE) 欢迎加入QQ群: 459420581 (Gopher成都,讨论一切与go有关的话题) gonet/2 gonet1已停止维护(I no longer maintain this, p

xtaci 1.2k Jun 26, 2022
Scalable Distributed Game Server Engine with Hot Swapping in Golang

GoWorld Scalable Distributed Game Server Engine with Hot Reload in Golang Features Architecture Introduction Get GoWorld Manage GoWorld Servers Demos

Nan Lin 2.1k Jun 28, 2022
A game server framework in Go (golang)

Leaf A pragmatic game server framework in Go (golang). Features Extremely easy to use Reliable Multicore support Modularity Community QQ 群:376389675 D

Name5566 4.4k Jun 28, 2022
Lightweight, facility, high performance golang based game server framework

Nano Nano is an easy to use, fast, lightweight game server networking library for Go. It provides a core network architecture and a series of tools an

Lonng 2k Jun 21, 2022
Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.

pitaya Pitaya is an simple, fast and lightweight game server framework with clustering support and client libraries for iOS, Android, Unity and others

TFG Co 1.5k Jun 28, 2022
Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes

Agones is a library for hosting, running and scaling dedicated game servers on Kubernetes. Agones, is derived from the Greek word agōn which roughly t

GoogleForGames 4.6k Jun 30, 2022
A game server side framework with both web API and realtime communication.

HAYABUSA Framework Hayabusa is a server side framework for Japan-like social games. Easy to understand and use for beginners Powerful controller, flex

はやぶさクラウド 17 May 21, 2022
game server by golang

使用golang开发的框架 How to use ? 参考 main.go Features kernel使用channel 和 goroutine 模拟的Actor模式 使用channel 模拟的消息队列 kernel.Context内部实现了一个链表,用于发起call的时候,由于自身channe

liangmanlin 15 Apr 20, 2022
This is a "simple" game server. Main functionalities are matching and establishing a connection between players

Game Server This is a "simple" game server. Main functionalities are matching and establishing a connection between players How to Run? run the server

eco 7 Feb 6, 2022