Guide

How to make a BungeeCord plugin

Updated October 18, 2026

A BungeeCord plugin runs on the proxy that sits in front of your servers, not on a game server. It sees players connect, switch servers and leave, so it is the right place for network-wide chat, staff tools, maintenance mode, the MOTD and sending players between servers. It has no worlds or blocks: gameplay belongs in a plugin on the backend servers.

Change the commands to your network.

Generate this with Codexe

Step by step

  1. 1.Confirm the proxy you run

    BungeeCord (or a fork such as Waterfall) and Velocity are different APIs. A BungeeCord plugin does not run on Velocity, and the other way around.

  2. 2.Set up the project

    A Maven or Gradle project with the bungeecord-api dependency in provided scope. The proxy supplies it at runtime.

  3. 3.Write the main class

    A class that extends net.md_5.bungee.api.plugin.Plugin, with onEnable() to register commands and listeners through getProxy().getPluginManager().

  4. 4.Describe it in bungee.yml

    name, version, main and author. BungeeCord also reads plugin.yml, but bungee.yml avoids confusion with Spigot plugins. Commands are registered in code, not in the file.

  5. 5.Write commands and listeners

    Commands extend Command; listeners implement Listener with @EventHandler methods for events such as PostLoginEvent or ServerSwitchEvent.

  6. 6.Talk to backend servers if needed

    The proxy cannot see inventories or worlds. For that, a small companion plugin on each backend server exchanges plugin messages with the proxy plugin.

  7. 7.Install it on the proxy

    Put the .jar in the proxy's plugins/ folder and restart the proxy, not the backend servers.

Useful proxy events

EventWhen it firesTypical use
ProxyPingEventA client refreshes the server listMOTD, player count, maintenance message
PostLoginEventA player has joined the proxyJoin messages, loading player data
ServerConnectEventA player is about to connect to a serverSending players to a lobby, blocking servers
ServerSwitchEventA player moved to another serverNetwork-wide "joined server" messages
PlayerDisconnectEventA player left the networkSaving data, staff notifications
ChatEventA player sends a chat message or commandNetwork chat, filters, staff chat

Setting up the network correctly

  • Turn on ip_forward in the proxy's config.yml and bungeecord: true in each Spigot or Paper server's spigot.yml, so player names and UUIDs are passed through.
  • Set the backend servers to online-mode=false and make sure they cannot be reached directly from the internet, only through the proxy.
  • Plugin messages travel only while a player is connected to that backend server, so a message to an empty server is not delivered.

Example description

"A BungeeCord 1.21 proxy plugin called NetUtils. /lobby sends the player to the lobby server. /staffchat <message> (alias /sc) sends a message to everyone with netutils.staff on any server. /maintenance on|off shows a maintenance MOTD and kicks players without netutils.bypass. A join message in staff chat when a staff member switches servers. Server names, MOTD and messages in config.yml."

With Codexe

Choose the BungeeCord/Velocity type and say which proxy you run, since they are different APIs. Codexe compiles the plugin with Maven and checks that the .jar has the right descriptor before it is Ready; without a version in the request, the BungeeCord API 1.21 is used. If you need a backend companion, ask for it as a separate Spigot/Paper project.

Try it now does not run proxy servers yet, so test the proxy plugin on your own network or a local proxy with one backend server. See also the BungeeCord plugin generator.

Questions

Can a BungeeCord plugin change blocks or inventories?

No, the proxy only handles connections and messages. Use a backend plugin for gameplay, and plugin messages if the two must work together.

Does it work on Velocity?

No. Velocity has its own API and velocity-plugin.json. If you run both, make two projects.

Proxy plugin or backend plugin for chat?

A proxy plugin if chat must reach players on every server. A backend plugin if chat stays on one server.

Make a plugin for your network

This prompt opens ready to send:

“A BungeeCord 1.21 proxy plugin called NetUtils: /lobby sends the player to the lobby server, /staffchat (alias /sc) sends a message to everyone with netutils.staff on any server, /maintenance on|off shows a maintenance MOTD and kicks players without netutils.bypass, staff switches announced in staff chat, server names, MOTD and messages in config.yml.”

Generate this with Codexe
How to make a BungeeCord plugin for your network | Codexe