PrismError allows you to handle packet-related errors in PocketMine-MP.
When a packet exception occurs, the plugin can automatically cancel it and perform a configurable action such as sending a message to the player or disconnecting them.
It also provides console logging for debugging purposes, giving server administrators full visibility into any packet-related issues without crashing the server.
- Catch and handle
PacketHandlingExceptionor any generic packet error. - Cancel problematic packets to prevent server instability.
- Configurable actions per error type: kick the player or send them a chat message.
- Customizable player messages using color codes (
&c,&e, etc.). - Console logging of stack traces and detailed error information for debugging.
- Fully configurable via
config.yml.
- Download the
PrismErrorplugin.pharfile. - Place it in your server's
pluginsdirectory. - Start your PocketMine-MP server.
- The default configuration file (
config.yml) will be generated inplugin_data/PrismError/.
You can configure how PrismError handles different types of errors:
packet-handling-exception:
enabled: true # Enable or disable handling of PacketHandlingException
mode: "kick" # "kick" to disconnect the player, "message" to send a chat message
reason: "&cPacket Error: %s" # Message shown to the player (%s is replaced by the error message)
log-console: true # Print full stack trace in the console
generic-error:
enabled: true # Enable or disable handling of all other errors
mode: "message"
reason: "&eInternal Error: %s"
log-console: trueExplanation of options:
enabled: Whether this type of error handling is active.mode: Determines what happens to the player (kickdisconnects,messagesends a chat message).reason: The message displayed to the player.%swill be replaced with the actual error message. Supports color codes.log-console: If true, the full error details are printed to the server console for debugging.
-
Simply run your server with PrismError enabled.
-
When a packet exception occurs:
- If
modeiskick, the player will be disconnected with the configured message. - If
modeismessage, the player will stay connected and receive the configured chat message.
- If
-
Check the console for detailed logs if
log-consoleis enabled.
- PrismError is compatible with PocketMine-MP 4.0.0 and higher.
- The plugin works automatically without requiring any manual intervention after installation.
This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.