CrossServerPM
Cross-server private messaging for PocketMine-MP networks.
version 1.0.0
7 downloads · 0 stars
Published 1 May 2026 from TitaniumLB6571/CrossServerPM at fc60108f5c19988ad85dc1d06ea359f97124efc6, after moderator review.
Plugin description
CrossServerPM
CrossServerPM lets players send private messages between linked PocketMine-MP servers.
Example:
/msg Carl hi
If Carl is on another linked server, Carl can receive:
[Titan Server] Player -> Me: hi
The formats are configurable in config.yml.
Description
- Send private messages to players on the same server or another linked server.
- Reply to the last private message with
/replyor/r. - Link only the servers you own by using the same network id and secret.
- Choose between
mysql,relay,redis, orfiletransport. - Customize message prefixes and formats.
- Check linked status, connected servers, and configured offline servers in-game.
How to use?
- Add the plugin to every PocketMine-MP server you want linked.
- Restart each server once so
config.ymlis created. - Pick one transport in
config.yml:mysql,relay,redis, orfile. - Copy the matching example from
resources/examples/if you want a full starting point. - Run
/xmsg key generateon one server. - Copy the generated
network.secretto every linked server. - Use the same
network.idand transport settings on every linked server. - Give every server a unique
server.id. - Set
enabled: true. - Restart the servers or run
/xmsg reload.
Requirements
- PocketMine-MP API 5.
- PHP
pdo_mysqlextension fortransport: mysql. - PHP
curlextension fortransport: relayand Poggit update checks. - Redis/Valkey server access for
transport: redis. The PHP Redis extension is not required. - A shared folder available to every linked server for
transport: file. - Node.js 18 or newer only if you run the optional reference relay app from this source repository.
Example configs
Use only one transport at a time. Pick one file from resources/examples/, copy it into plugin_data/CrossServerPM/config.yml, then edit it.
resources/examples/mysql.yml- Use one shared MySQL/MariaDB database.resources/examples/relay.yml- Use the included HTTP relay app.resources/examples/redis.yml- Use Redis/Valkey, including Redis Cloud.resources/examples/file.yml- Use one shared folder for same-machine servers.
On every linked server, keep these the same:
transportnetwork.idnetwork.secretnetwork.servers- The settings for the selected transport
On each linked server, change these:
server.idserver.display-name
Transport options
MySQL
Use transport: mysql if you want the easiest public-plugin setup.
All linked servers connect to the same MySQL/MariaDB database. You do not need to run a separate relay app or configure a relay URL.
Use the same values on every linked server:
transport: mysql
network:
id: "titan-network"
secret: "same-secret-on-every-linked-server"
servers:
survival: "Titan Survival"
skyblock: "Titan Skyblock"
mysql:
host: "mysql.example.net"
port: 3306
database: "titan_crossserverpm"
username: "titan_crossserverpm"
password: "fake-password-change-this"
Only change this per server:
server:
id: "survival"
display-name: "Titan Survival"
For the second server, use something like:
server:
id: "skyblock"
display-name: "Titan Skyblock"
Relay
Use transport: relay if you want servers to talk to a relay service instead of a database.
The URL is the address of the relay service. It can be on your domain, but only if that domain is actually hosting the relay. Your normal Minecraft address is not enough unless the relay is also running there.
Example:
transport: relay
relay:
url: "https://relay.titan-network.example"
A small reference relay is available in this source repository at relay/server.js:
cd relay
node server.js
You can also start it with:
cd relay
npm start
If the relay is protected with RELAY_ACCESS_KEY, put the same value in relay.access-key:
transport: relay
relay:
url: "https://relay.titan-network.example"
access-key: "change-this"
For public internet use, put the relay behind HTTPS with a reverse proxy.
Redis / Valkey
Use transport: redis if your host provides Redis/Valkey or you already run it for your network.
transport: redis
redis:
host: "redis.example.com"
port: 6379
username: ""
password: "change-this"
database: 0
key-prefix: "cspm"
The plugin talks to Redis directly over TCP, so it does not need the PHP Redis extension.
File
Use transport: file only when every linked server can access the same folder. This is useful when multiple servers run on one machine.
transport: file
file:
path: "/home/minecraft/shared-crossserverpm"
Do not use file transport for unrelated servers on different machines unless you know the folder is a reliable shared mount.
In-game commands
/msg <player> <message>- Send a private message./tell <player> <message>- Alias for/msg./w <player> <message>- Alias for/msg./reply <message>- Reply to the last private message./r <message>- Alias for/reply.- Console can use
/msgand/replywhenruntime.allow-console-messagingistrue. /xmsg status- Show transport, network, and readiness status./xmsg servers- List connected servers and configured servers that are not connected./xmsg update- Check Poggit for a newer CrossServerPM release./xmsg reload- Reload config./xmsg key generate- Generate a shared network secret. (this gets put in your config automatically when running the commmand)
Server list command
/xmsg servers always shows the local server. It also shows remote servers that are currently sending heartbeats through the selected transport.
To show servers that are not connected, list the expected servers in network.servers on every linked server:
network:
servers:
survival: "Titan Survival"
skyblock: "Titan Skyblock"
factions: "Titan Factions"
If skyblock is not sending heartbeats, /xmsg servers will show it as NOT CONNECTED.
Poggit update checks
CrossServerPM can check Poggit for newer approved releases. This only notifies console and admins; it does not download or replace files automatically.
updater:
enabled: true
plugin-name: "CrossServerPM"
current-version: ""
notify-console: true
notify-ops: true
check-interval-hours: 12
include-prereleases: false
verify-tls: false
Leave updater.current-version empty unless you are running a custom build. When it is empty, CrossServerPM uses the version in plugin.yml.
verify-tls is disabled by default because many bundled PocketMine PHP builds on Windows do not ship with a configured CA bundle. The updater only reads public Poggit metadata and does not auto-install files.
Admins can force a check with /xmsg update.
Implemented Features
- Cross-server
/msg. - Cross-server
/reply. - Local private messaging fallback.
- MySQL transport.
- HTTP relay transport.
- Redis/Valkey transport.
- Shared-folder file transport.
- Configurable server names.
- Configurable message formats.
- Private server groups using
network.idandnetwork.secret. - Message length limit.
- Command cooldown.
- Stale player cleanup.
- Optional console
/msgand/reply. - Admin status command.
- Connected/offline server list command.
- Poggit update notifications with
/xmsg update.
Installing it
Drop the phar into plugins/ and restart the server. If the API version below does not match your server, the plugin will refuse to load, which is the check working as intended.
Releases
| Version | API | Built |
|---|---|---|
| 1.0.0 | 5.0.0 | 1 May 2026 · 43 KB |
SHA-256 of 1.0.02be181157cfa5a12e6a1e7b831088c4dde8380b5cdd610157fbb68e01718c861
Reviewed by a moderator before publishing. Built from TitaniumLB6571/CrossServerPM at fc60108f5c19988ad85dc1d06ea359f97124efc6. Nobody reviews plugin code here: read the source before running it on a server you care about.
Sign in with GitHub to star this plugin or leave a comment.
No comments yet.