{"id":15636914,"url":"https://github.com/sandertv/mcwss","last_synced_at":"2025-08-21T12:30:36.291Z","repository":{"id":46586618,"uuid":"171338891","full_name":"Sandertv/mcwss","owner":"Sandertv","description":"A websocket server for Minecraft Bedrock Edition","archived":false,"fork":false,"pushed_at":"2024-03-06T05:59:54.000Z","size":109,"stargazers_count":118,"open_issues_count":14,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-07T23:03:13.483Z","etag":null,"topics":["golang","minecraft","websocket"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/Sandertv/mcwss","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sandertv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-18T18:56:42.000Z","updated_at":"2024-11-17T22:36:16.000Z","dependencies_parsed_at":"2024-06-18T22:30:12.406Z","dependency_job_id":null,"html_url":"https://github.com/Sandertv/mcwss","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandertv%2Fmcwss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandertv%2Fmcwss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandertv%2Fmcwss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandertv%2Fmcwss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sandertv","download_url":"https://codeload.github.com/Sandertv/mcwss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230511479,"owners_count":18237657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","minecraft","websocket"],"created_at":"2024-10-03T11:09:04.054Z","updated_at":"2024-12-19T23:14:46.943Z","avatar_url":"https://github.com/Sandertv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcwss\nA documentation and implementation of the Minecraft Bedrock Edition websocket protocol.\n\n## Minecraft Websockets\nMinecraft has websocket connection commands that may be used to connect to a websocket server. These commands are `/connect` and `/wsserver`.\nBoth these commands have the same effect. Once connected to a websocket, the connection will last until the server closes it or until the\nplayer completely exits the game. The connection will last when a player merely leaves a world, and will thus last when joining a server.\nWebsockets in Minecraft can be used for simple command communication between a player and a server. Additionally, the server can choose to\nlisten for certain events sent by the client and act upon receiving them.\n\nIn order to be able to execute the `/connect` and `/wsserver` commands, cheats must be enabled. This means that connecting on third party\nservers is not possible, and only on the dedicated server when cheats are enabled. It is possible to connect on a singleplayer world and\njoin a server after that, but commands executed by the websocket server will not work. Events will still be sent by the client however.\n\nIn the settings tab, there is also a setting that enables/disables encrypted websockets. mcwss implements encryption between websockets, \nso changing this setting will not have an effect on the behaviour of mcwss.\n\n## Getting Started\n\n### Prerequisites\nmcwss is a Go library. To use it, Go must be installed. The library may be downloaded using `go get github.com/sandertv/mcwss`.\n\n### Usage\n```go\npackage main\n\nimport (\n\t\"github.com/sandertv/mcwss\"\n)\n\nfunc main() {\n    // Create a new server using the default configuration. To use specific configuration, pass a *wss.Config{} in here.\n    server := mcwss.NewServer(nil)\n    \n    server.OnConnection(func(player *mcwss.Player){\n      // Called when a player connects to the server.\n    })\n    server.OnDisconnection(func(player *mcwss.Player){\n      // Called when a player disconnects from the server.\n    })\n    // Run the server. (blocking)\n    server.Run()\n}\n```\nThe server may now be connected to by joining a singleplayer game and executing the command `/connect localhost:8000/ws`.\n\n### Documentation\nhttps://godoc.org/github.com/Sandertv/mcwss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandertv%2Fmcwss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandertv%2Fmcwss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandertv%2Fmcwss/lists"}