RA-ClearLag

A whitelist-based clear lag plugin for Paper 1.21.x: only the item types you list are cleared from the ground, with a configurable countdown broadcast and PlaceholderAPI timers.

Author: RajaAditya Website: rajaaditya.my.id Version: 1.0.0 API: Paper 1.21.x (Java 21)


Features

Whitelist Clearing

  • Most clear lag plugins delete everything. RA-ClearLag clears only the materials you list, so valuable drops are never wiped by accident
  • Turn the whitelist off to clear every dropped item instead
  • Optionally clear stuck arrows and experience orbs (these ignore the whitelist, since they are not item stacks)
  • Choose the worlds where it runs, or use all

Countdown Broadcasts

  • A repeating cycle with a configurable interval (default 5 minutes)
  • Warnings are sent at the seconds you choose, for example 60, 30, 10, 5, and 3 seconds before the clear
  • After each clear, the amount removed is announced

Fully External Messages

  • No text is hardcoded. Everything is in messages.yml, and missing keys are merged in automatically after an update

PlaceholderAPI Timers

  • Show the time until the next clear on a scoreboard or tab list

Dependencies

PluginRequiredPurpose
PlaceholderAPINo (softdepend)Enables %raclearlag_*% placeholders

Installation

  1. Place RA-ClearLag.jar into your plugins/ folder
  2. Restart the server
  3. Edit config.yml and messages.yml
  4. Run /raclearlag reload

File Structure

text
1
plugins/RA-ClearLag/
├── config.yml       # Interval, warnings, whitelist, clear options, worlds
└── messages.yml     # All messages

Configuration

config.yml

yaml
1
settings:
  interval: 300              # seconds between clears
  broadcast-warnings:        # seconds before the clear
    - 60
    - 30
    - 10
    - 5
    - 3

whitelist:
  enabled: true              # false = clear ALL dropped items
  items:                     # vanilla Bukkit material names
    - DIAMOND
    - COBBLESTONE
    - IRON_INGOT
    - GOLD_INGOT
    - NETHERITE_SCRAP

clear:
  clear-dropped-items: true
  clear-arrows: false
  clear-experience-orbs: false
  worlds:
    - all

messages.yml

yaml
1
prefix: "&8[&bRA-ClearLag&8] &r"

messages:
  reload-success: "{prefix}&aConfiguration has been reloaded successfully!"
  no-permission: "{prefix}&cYou don't have permission to use this command."

broadcast:
  warning: "{prefix}&eGround items will be cleared in &c{time} &eseconds!"
  cleared: "{prefix}&aCleared &e{amount} &aitems from the ground!"

{prefix} is replaced with the prefix, {time} with the seconds left, and {amount} with the number of items removed.


Commands

The main command is /raclearlag (aliases /rcl, /clearlag).

CommandDescriptionAccess
/raclearlag helpShow the helpEveryone
/raclearlag reloadReload config.yml and messages.ymlraclearlag.reload
/raclearlag clearClear lag right nowraclearlag.admin

Permissions

PermissionDefaultDescription
raclearlag.adminopAccess to all commands, including a forced clear
raclearlag.reloadopReload the configuration

PlaceholderAPI

Requires PlaceholderAPI. Identifier: raclearlag.

PlaceholderExampleDescription
%raclearlag_timer%00:04:32Time until the next clear (HH:mm:ss)
%raclearlag_timer_mmss%04:32Time until the next clear (mm:ss)
%raclearlag_timer_seconds%272Time until the next clear in seconds
%raclearlag_interval%00:05:00The configured interval (HH:mm:ss)
%raclearlag_interval_seconds%300The configured interval in seconds

License

Developed by RajaAditya — rajaaditya.my.id