Folia-compatible fork of NousadS/GeyserSanitizer for Luminol 26.1.2
Find a file
ekaii d16de04382
Some checks failed
release.yml / ci: add upstream-watch + release-on-tag, remove dead CI (push) Failing after 0s
ci: add upstream-watch + release-on-tag, remove dead CI
2026-07-15 12:12:12 +02:00
.forgejo/workflows ci: add upstream-watch + release-on-tag, remove dead CI 2026-07-15 12:12:12 +02:00
gradle/wrapper version: v0.3.1 2026-04-02 14:52:56 +02:00
src/main folia: mark folia-supported (netty-only packetevents listener, no scheduler changes needed) 2026-07-02 00:26:21 +00:00
.ekaii-upstream.env ci: add upstream-watch + release-on-tag, remove dead CI 2026-07-15 12:12:12 +02:00
.ekaii-upstream.sha ci: add upstream-watch + release-on-tag, remove dead CI 2026-07-15 12:12:12 +02:00
.gitignore patch: .gitignore 2026-04-02 14:52:35 +02:00
build.gradle.kts patch: force load after some plugins 2026-04-04 12:29:25 +02:00
gradlew folia: mark folia-supported (netty-only packetevents listener, no scheduler changes needed) 2026-07-02 00:26:21 +00:00
gradlew.bat version: v0.3.1 2026-04-02 14:52:56 +02:00
LICENSE update: license 2026-04-02 15:09:16 +02:00
README.md initial commit 2026-04-02 14:50:54 +02:00
settings.gradle.kts version: v0.3.1 2026-04-02 14:52:56 +02:00

GeyserSanitizer

Description

GeyserSanitizer is a Spigot/Paper plugin designed to sanitize text components sent to Bedrock players, preventing client crashes or display issues that can arise from certain unsupported text features. It specifically targets and modifies chat messages, system messages, and team-related text (nametags, prefixes, suffixes) to ensure compatibility with Bedrock clients connected via GeyserMC/Floodgate.

Features

  • Chat Message Sanitization: Intercepts and sanitizes outgoing chat messages.
  • System Message Sanitization: Intercepts and sanitizes outgoing system messages.
  • Team Text Sanitization: Cleans nametags, prefixes, and suffixes sent as part of team updates.
  • Bedrock Player Detection: Utilizes Floodgate API to selectively apply sanitization only to Bedrock players.
  • Icon/Head Icon Removal: Removes JSON components containing 'atlas', 'sprite', 'hat', or 'player' keys, which are known to cause issues on Bedrock clients.

Dependencies

This plugin requires the following to function correctly:

  • PacketEvents: Used for intercepting and modifying network packets.
  • Floodgate: Used to identify Bedrock players.

How It Works

The plugin registers a PacketInterceptor listener with PacketEvents. When a server sends certain packets (CHAT_MESSAGE, SYSTEM_CHAT_MESSAGE, TEAMS), the interceptor checks if the recipient is a Bedrock player (using Floodgate). If so, it sanitizes the net.kyori.adventure.text.Component messages by removing JSON structures that contain problematic keys (like "atlas", "sprite", "hat", "player") before the packet is sent to the client. This prevents unsupported features from reaching the Bedrock client and causing issues.

Installation

  1. Ensure you have a Spigot/Paper server running.
  2. Install the required dependencies:
  3. Download the latest GeyserSanitizer release from the GitHub releases page (or build it yourself).
  4. Place GeyserSanitizer-<version>.jar into your server's plugins/ folder.
  5. Restart your server.

Building from Source

This project uses Gradle.

  1. Clone the repository:
    git clone https://github.com/NousadS/GeyserSanitizer.git
    cd GeyserSanitizer
    
  2. Build the plugin:
    ./gradlew build
    
    The compiled JAR will be located in build/libs/.