You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 28, 2025. It is now read-only.
DockyardMC open-source, fast and lightweight Minecraft server protocol implementation that's written from scratch in Kotlin without any code from Mojang. It is focused on making development easy, unlike PaperMC which still uses some really old bukkit APIs, Dockyard has very easy to use and modern API
8
+
# 🌊 <u>DockyardMC</u> 🚢
7
9
8
-
> [!WARNING]
9
-
> This project is currently under heavy development, and it is NOT production ready.
10
+
DockyardMC is an open-source, fast and lightweight Minecraft server protocol implementation that's written from scratch in Kotlin without any code from Mojang. It is focused on making developing and prototyping easy, simple and intuitive while having full control over every aspect of the server.
11
+
12
+
**This project currently under development, missing parts some users might rely on**
10
13
11
14
## Quick Start
12
15
13
-
You can read how to setup and use dockyard here: https://dockyard.lukynka.cloud/wiki/quick-start
16
+
You can read how to setup and use dockyard [here](https://dockyard.lukynka.cloud/wiki/quick-start)
14
17
15
18
## Features
16
19
17
-
- Easy to use, modern and extensible API
20
+
- Modern, simple to use API which makes developing and prototyping easy and fast
21
+
- Lightweight and without all the overhead the vanilla server has
18
22
- Ability to take full control over every aspect of the server
19
-
- Lightweight
20
-
- uhhh there will be more stuff here later
23
+
- Fully multithreaded worlds
21
24
22
25
## API Examples
23
26
24
-
####Events
27
+
### Events
25
28
26
29
```kotlin
27
-
Events.on<PlayerConnectEvent> {
28
-
DockyardServer.broadcastMessage("<lime>→ <yellow>${it.player} has joined the server.")
29
-
}
30
-
```
31
-
32
-
Modifying events (including PacketReceived and PacketSent)
DockyardServer.broadcastMessage("<aqua>Reminder: <yellow>Stay hydrated and stretch once in a while!")
78
+
val sidebar =Sidebar {
79
+
setTitle("<yellow><bold>My Cool Server")
80
+
setGlobalLine("")
81
+
setPlayerLine { player ->"Welcome, <aqua>$player" }
82
+
setPlayerLine { player ->"World: <yellow>${player.world.name}" }
83
+
setPlayerLine { player ->"Ping: <pink>${player.ping}" }
84
+
setGlobalLine("")
85
+
setGlobalLine("<yellow>www.mycoolserver.uwu")
86
+
}
87
+
88
+
Events.on<PlayerJoinEvent> { event ->
89
+
sidebar.viewers.add(event.player)
81
90
}
82
91
```
92
+
Changing any lines, title etc. will automatically send update to the viewers
83
93
84
-
---
94
+
#### Bossbar API
95
+
```kotlin
96
+
val bossbar =Bossbar("<yellow>The server has uptime is: <orange>$serverUptime<yellow>!", 1f, BossbarColor.YELLOW, BossbarNotches.SIX)
85
97
86
-
_there will be more later_
98
+
Events.on<PlayerJoinEvent> { event ->
99
+
bossbar.addViewer(event.player)
100
+
}
101
+
```
102
+
Again, changing any properties of the bossbar will automatically send updates to the viewers
87
103
88
-
---
104
+
### Entity Metadata Layers
89
105
90
-
## Run Locally
106
+
Layering entity metadata per player allows for client-side changes to entities for purposes like client-side glowing and client-side invisibility.
91
107
92
-
- Clone the repository `git clone https://github.com/DockyardMC/Dockyard/`
93
-
- Go to the project directory `cd Dockyard`
94
-
- Open in IntelliJ and run task `Dockyard Server`
108
+
Note that this behaviour is not just sending one packet, but its whole system that overlays the player specific metadata layer over the entity's actual metadata
109
+
110
+
Here are few examples:
111
+
```kotlin
112
+
// pre-made functions to set client-side glowing and invisibility
113
+
entity.setGlowingFor(player, true)
114
+
entity.setInvisibleFor(player, false)
115
+
```
116
+
117
+
```kotlin
118
+
// get the metadata layer of player or create new one if it doesn't exist
119
+
val playerMetadataLayer = warden.metadataLayers[player] ?: mutableMapOf<EntityMetadataType, EntityMetadata>()
120
+
121
+
// create new EntityMetadata with index and type pose
122
+
val pose =EntityMetadata(EntityMetadataType.POSE, EntityMetaValue.POSE, EntityPose.ROARING)
// specified player will now see the warden roaring
129
+
```
130
+
131
+
## Running
132
+
133
+
Dockyard is mainly designed as library that can be imported via maven. If you want to run dockyard you will need to embed it into your own kotlin app.
95
134
96
135
## Contributing
97
136
98
137
Contributions are always welcome! Please always check branches to see if the feature you are contributing is not already existing feature that someone else is working on
99
138
139
+
(plus you get cool fancy orange contributor role on the discord!!!)
140
+
100
141
## Related Libraries / Projects
101
142
102
-
-**Scroll**, Minecraft component library made for DockyardMC
103
-
-https://github.com/DockyardMC/Scroll/
143
+
-**[Scroll](https://github.com/DockyardMC/Scroll/)** - Minecraft component library made for DockyardMC
144
+
-**[Chart](https://github.com/DockyardMC/Chart)** - Minecraft NBT library made for DockyardMC
145
+
-**[kotlin-bindables](https://github.com/LukynkaCZE/kotlin-bindables)** - Bindable system inspired by [osu!framework](https://github.com/ppy/osu-framework/)
146
+
-**[Pathetic](https://github.com/Metaphoriker/pathetic)** - A powerful, optimized and easy-to-use Java A* Pathfinding Library for 3D environments.
147
+
-**[Spark](https://github.com/lucko/spark)** - A performance profiler for Minecraft clients, servers, and proxies
0 commit comments