Skip to content

Allows you to handle packet-related errors, cancel them, and perform an action such as sending a message or kicking the player.

License

Notifications You must be signed in to change notification settings

PrismStudioMC/PrismError

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism Studio – PrismError

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.

Features

  • Catch and handle PacketHandlingException or 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.

Installation

  1. Download the PrismError plugin .phar file.
  2. Place it in your server's plugins directory.
  3. Start your PocketMine-MP server.
  4. The default configuration file (config.yml) will be generated in plugin_data/PrismError/.

Configuration (config.yml)

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: true

Explanation of options:

  • enabled: Whether this type of error handling is active.
  • mode: Determines what happens to the player (kick disconnects, message sends a chat message).
  • reason: The message displayed to the player. %s will 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.

Usage

  1. Simply run your server with PrismError enabled.

  2. When a packet exception occurs:

    • If mode is kick, the player will be disconnected with the configured message.
    • If mode is message, the player will stay connected and receive the configured chat message.
  3. Check the console for detailed logs if log-console is enabled.

Notes

  • PrismError is compatible with PocketMine-MP 4.0.0 and higher.
  • The plugin works automatically without requiring any manual intervention after installation.

License

This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.

About

Allows you to handle packet-related errors, cancel them, and perform an action such as sending a message or kicking the player.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages