AntiPearlGlitch
Ender Pearl Protection for Paper & Folia 1.21+
Players glitch through barriers, walls and ceilings with ender pearls. It's one of the oldest exploits in Minecraft and it still works.
AntiPearlGlitch stops it. Pearls either get destroyed or bounce off, players who land inside blocks get redirected to a safe spot, and with optional WorldGuard support you can keep pearls from escaping into safezones.
No gameplay changes, no false positives, just solid protection.
The Problem
Ender pearls can teleport players through barriers, glass panes, fences and other thin blocks. This lets them bypass spawn protection, break into bases, escape arenas or reach areas they shouldn't be in.
Vanilla Minecraft doesn't fix this. Most protection plugins don't either, they only cancel the teleport after the pearl already landed inside a wall, which eats the pearl and confuses the player.
AntiPearlGlitch intercepts the pearl before it lands. Depending on your config, it either despawns the pearl or reflects it off the surface like a real bouncing object. Clean, predictable, no pearls wasted for no reason.
Two Modes
Despawn Mode
The pearl hits a blocked block and gets removed. The player hears a glass break sound and gets a configurable message. Simple and effective.
Reflect Mode (default)
The pearl bounces off the blocked block in a physically correct direction, like a ball off a wall. The velocity and bounce count are configurable. After the maximum number of bounces, the pearl breaks. This feels natural and doesn't punish players for throwing pearls near walls.
Safe Landing
Sometimes a pearl lands right at the edge of a block and the player would teleport inside a wall. AntiPearlGlitch checks the landing spot and if it's inside a solid block, it searches for the nearest safe position within a configurable radius. If no safe spot is found, the teleport gets cancelled and the player is notified.
This catches edge cases that other plugins miss entirely.
WorldGuard Integration
Optional integration that stops players from escaping a fight by pearling into spawn or any other safezone. Disabled by default. Flip
worldguard.enabled to true and you're done, no region setup required.Out of the box it uses your existing region PvP flags: a pearl is only blocked when it crosses from a PvP-allowed area into a PvP-denied area. Pearls thrown entirely inside a safezone, or entirely inside a PvP zone, are untouched. No false positives on global no-PvP servers.
Need finer control? Use the custom
apg-pearl region flag to override per region:/rg flag spawn apg-pearl denymakes sure no pearls can land in "spawn", ever/rg flag arena apg-pearl allowmakes sure pearls always work in "arena", even if PvP is off there
Blocked pearls can either despawn silently or reflect back at the thrower, configurable via
worldguard.mode.Features
- Block ender pearl glitching through any configurable block type
- Two modes: despawn or realistic reflection
- Configurable bounce count, velocity multiplier and search radius
- Safe-location redirect when pearls land inside solid blocks
- WorldGuard support stops players escaping into safezones with pearls
- Custom
apg-pearlregion flag to allow or deny pearls per region - Verbose debug logging for diagnosing tricky setups
- Toggleable player messages with color code support
- Configurable permission nodes
- Lightweight, no NMS, WorldGuard is optional
- Paper, Purpur and Folia compatible
Commands
/apg reloadreloads the config
Aliases:
/antipearlglitch, /antiglitchPermissions
apg.admin(default: OP) gives access to admin commandsapg.bypass(default: false) lets a player bypass pearl glitch protection
Both permission nodes are configurable in
config.yml.Setup
- Drop the jar into your
plugins/folder - Start the server
- Edit
plugins/AntiPearlGlitch/config.ymlif needed - Run
/apg reloadto apply changes
Requirements
- Java 21+
- Paper, Folia, or Purpur 1.21+
- WorldGuard 7.0.13+ (optional, for the WorldGuard integration)
Configuration
Code:
# Verbose debug logging. Prints every pearl hit, WorldGuard region
# lookup and teleport decision to console. Leave OFF in production.
debug: false
# Mode: DESPAWN or REFLECT
mode: REFLECT
# Block types that trigger protection
blocked-blocks:
- BARRIER
# Reflect settings
reflect-strength: 0.7
max-bounces: 3
# Search radius for safe landing spot (0 = just cancel)
safe-search-radius: 3
# WorldGuard integration. Stops players escaping into safezones with pearls.
# Uses each region's PvP flag by default. Override per region with the
# custom apg-pearl flag:
# /rg flag spawn apg-pearl deny never allow pearls in "spawn"
# /rg flag arena apg-pearl allow always allow pearls in "arena"
# mode: DESPAWN (silent) or REFLECT (bounce back at the thrower)
worldguard:
enabled: false
mode: DESPAWN
# Permission nodes (customizable)
permissions:
admin: "apg.admin"
bypass: "apg.bypass"
# Player messages (set enabled to false to disable)
messages:
enabled: true
pearl-blocked: "&cYour ender pearl could not find a safe landing spot."
reloaded: "&aAntiPearlGlitch config reloaded."
FAQ
Does it affect normal pearl usage?
No. Pearls that land on open ground or in safe spots work exactly like vanilla. Only pearls that hit blocked blocks or would teleport the player into a wall are intercepted.
Which blocks should I add to the blocklist?
BARRIER is the default because that's the most common glitch target. You can add IRON_BARS, GLASS_PANE, FENCE or any other block type that players are glitching through on your server.Despawn or Reflect?
Reflect feels better for players because their pearl doesn't just vanish. It bounces off and might still land somewhere useful. Despawn is simpler and more predictable if you just want pearls gone.
Performance impact?
Essentially zero. The plugin only runs a check when an ender pearl hits a block or a pearl teleport happens. No ticking, no packet interception, no background tasks.
Does it work with Folia?
Yes, fully compatible. No region-threading issues.
Do I need WorldGuard?
No. WorldGuard is fully optional, the plugin runs perfectly without it. Install WorldGuard and flip
worldguard.enabled to true only if you want the safezone-escape protection.Do I need to set up regions for WorldGuard support?
No. Out of the box it uses your existing region PvP flags, so it works on most servers without any extra setup. The custom
apg-pearl flag is only for admins who want to override the default behaviour per region.© 2026 DevKayo All rights reserved.
