https://github.com/bedrock-ws/bedrockws-deno
MCBE WebSocket implementation in Deno (TypeScript/JavaScript)
https://github.com/bedrock-ws/bedrockws-deno
mcbe minecraft minecraft-bedrock websocket
Last synced: 15 days ago
JSON representation
MCBE WebSocket implementation in Deno (TypeScript/JavaScript)
- Host: GitHub
- URL: https://github.com/bedrock-ws/bedrockws-deno
- Owner: bedrock-ws
- License: apache-2.0
- Created: 2025-07-08T00:01:39.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-04-30T09:32:16.000Z (about 1 month ago)
- Last Synced: 2026-04-30T11:22:29.646Z (about 1 month ago)
- Topics: mcbe, minecraft, minecraft-bedrock, websocket
- Language: TypeScript
- Homepage: https://jsr.io/@bedrock-ws
- Size: 1.64 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
MCBE WebSocket Server
A Minecraft: Bedrock Edition WebSocket implementation in Deno/TypeScript.
> [!WARNING]
> `@bedrock-ws/bedrockws` and `@bedrock-ws/schema` are still in beta release.
```typescript
import { consts, Server } from "@bedrock-ws/bedrockws";
const server = new Server();
server.on("PlayerMessage", (event) => {
const { client, data } = event;
if ((Object.values(consts.names) as string[]).includes(data.sender)) {
// don't react on messages sent by the server
return;
}
client.run(`say ${data.message}`);
});
```
```typescript
import { Bot, floatParamType } from "@bedrock-ws/bot";
import type { Command, CommandArgument, CommandOrigin } from "@bedrock-ws/bot";
const sinCommand: Command = {
name: "sin",
description: "Calculates the sine",
mandatoryParameters: [
{ type: floatParamType, name: "number" },
],
examples: [{
description: "Calculate the sine of 1",
args: ["1"],
}],
};
bot.cmd(sinCommand, (origin: CommandOrigin, ...args: CommandArgument[]) => {
const { client } = origin;
const n = args.shift() as number;
client.sendMessage(`sin(${n}) = ${Math.sin(n)}`);
});
```
## Features
- **Markup**
```typescript
import { style } from "@bedrock-ws/ui";
assertEquals(style`ABC`, "§cA§lB§r§cC§r");
```
- **Pretty help command out of the box**

- ... and more
## Examples
You can configure the host and port in the `.env` file. See also
.
```console
deno run --env-file=.env -A src/bedrockws/examples/echo.ts
```
## Logging/Telemetry
Set the environment variable `BEDROCKWS_DENO_TELEMETRY` to `1` to enable
logging. Messages received from the Minecraft client(s) will be stored in
`.cache/bedrockws-deno` in your home directory.
## References
-
-
-
## License
`bedrockws-deno` is licensed under Apache 2.0 with exceptions of `src/mapart`
and `src/ui` which are licensed under MIT. Further information can be found in
the license files of the subdirectories accordingly.