A Golang starter template for creating your awesome Minecraft proxy and extensions powered by Minekube Gate 🚀 Fork it! https://gate.minekube.com/developers/
  • Go 96.1%
  • Dockerfile 2.7%
  • Makefile 1.2%
Find a file Use this template
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate[bot] 2161988eb6
chore(deps): update golang docker tag to v1.27.4 (#152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 06:48:29 +00:00
.github/workflows chore(deps): update actions/checkout action to v5 (#84) 2025-09-16 17:16:09 +02:00
assets Initial commit 2023-12-31 17:51:17 +01:00
plugins feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
util fix: Unicode not working in Gradient (#19) 2024-04-21 12:52:48 +02:00
config.yml feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
Dockerfile chore(deps): update golang docker tag to v1.27.4 (#152) 2026-11-11 06:48:29 +00:00
gate.go feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
go.mod feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
go.sum fix(deps): update module github.com/go-logr/logr to v1.4.4 (#135) 2026-07-21 05:28:24 +00:00
LICENSE Initial commit 2023-12-31 15:49:08 +01:00
Makefile Initial commit 2023-12-31 17:51:17 +01:00
permissions.yml feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
README.md feat: add a file-backed permission provider example for builtin commands (#151) 2026-11-03 07:32:07 +00:00
renovate.json Allow Renovate to auto-merge 2024-01-01 17:17:27 +01:00

Contributors Forks Stargazers Issues License


Logo

Gate Starter Plugin Template

An awesome template for creating your Minecraft proxy powered by Minekube Gate!

Explore the docs »

Discord · Report Bug · Request Feature

About The Project

Product Name Screen Shot

This template repository bootstraps your Minekube Gate project, a customizable Minecraft proxy written in Go.

What's Included?

  • gate.go: The main entry point of the application.
  • plugins: The directory for your custom plugins.
  • config.yml: A minimal Gate configuration file.
  • permissions.yml: Permission grants for the builtin command example plugin.
  • Dockerfile: A Dockerfile for building a Docker image.
  • .github/workflows: GitHub Action for testing, linting, releasing on tags and publishing Docker images to ghcr.io.
  • Makefile: Contains commands for testing and linting.
  • renovate.json: Configuration file for Renovate automatic dependency updates.
Prerequisites

Prerequisites

  • Go - The Go Programming Language
  • Git - Distributed Version Control System
  • GoLand / VSCode - Gophers' favorite IDEs

Getting Started

  1. Fork this repository on GitHub.
  2. Clone forked repository (git clone <your-forked-repo-url>)
  3. Open project in your favorite Go IDE.
  4. Run the proxy: go run .
  5. Start customizing Gate to your needs!

Usage

To create a new Gate plugin, follow these steps:

  1. Create and write your plugin code in a new plugins/xyz/xyz.go file.
  2. Add your exported plugin to the proxy.Plugins slice in gate.go.
  3. Build and run Gate with: go run .

Use the -d flag to run Gate in debug mode if you encounter issues. (go run . -d)

Example: permissions for builtin commands

plugins/permissions is a ready-to-use example of a permission provider. Gate has no permission setting in config.yml: a player's permissions are whatever the code handling proxy.PermissionsSetupEvent returns, and that event fires once per player at login. So requireBuiltinCommandPermissions: true alone would deny /server, /glist and /send to everybody.

The plugin answers that event from permissions.yml (read at startup, overridable with the GATE_PERMISSIONS_FILE environment variable):

# grants for every player that has no entry under "players"
default:
  - gate.command.server

players:
  # UUID or username, case-insensitive. A listed player REPLACES "default".
  "069a79f4-44e9-4726-a5be-fca90e38aaf5":
    - gate.command.server
    - gate.command.glist

# explicit denials win over every grant above
deny:
  "069a79f4-44e9-4726-a5be-fca90e38aaf5":
    - gate.command.send

Wildcards work too: gate.command.* for all builtin commands, * for every node. A node that is not granted stays Undefined (rather than False), so another plugin's provider can still decide it - while requireBuiltinCommandPermissions treats it as denied.

Nodes: gate.command.server, gate.command.glist, gate.command.send. Gate's own commands are not the only consumers - any proxy.Player.HasPermission("...") call in your plugins sees the same function, so you can gate your own commands with your own node names.

If you need something richer (LuckPerms-style groups, a database, a web API), keep the same shape: subscribe in your plugin's Init and call e.SetFunc(...).

Already got a permission plugin? Then delete this one from the proxy.Plugins slice - two providers both calling SetFunc means the last subscription wins.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feat/AmazingFeature)
  5. Open a Pull Request on GitHub

(back to top)