Menu
 

CoreProtect Guide (2026): Commands, Rollback, Restore & Setup

CoreProtect: The Complete Admin Guide (2026)

CoreProtect is the most-installed grief-protection plugin on Spigot, Paper, and Purpur servers. It logs every block break, placement, chest transaction, chat message, command, sign edit, login, and item drop in a local database. When grief happens, you do not negotiate, you do not investigate for hours: you run one command and the damage is undone, surgical to the player who caused it, without touching anyone else's build.

This page covers every command you actually need in practice, the flag combinations that handle the most common admin scenarios, and the setup steps that prevent the plugin from becoming a performance problem at scale.

The four commands that do 95% of the work

CommandAliasWhat it does
/co inspect/co iToggle inspector mode. Click a block (or the air where one used to be) and chat tells you who, when, and what.
/co lookup/co lSearch the logs without changing anything. Use this to investigate before you commit to a rollback.
/co rollback/co rbUndo actions matching the filters. Reverses placements and breaks, restores stolen items.
/co restore/co rsThe opposite of rollback. Reapply actions, or undo a rollback you regret.

Every other command (/co purge, /co reload, /co status, /co consumer, /co migrate-db, /co help) is administrative housekeeping.

The flag system

Rollback, restore, and lookup all share the same filter language. Combine flags to narrow what gets touched.

FlagMeaningExample
u:<user>One or more usernames (comma-separated).u:Notch,Intelli
t:<time>Time window. Units: w, d, h, m, s. Ranges with a dash.t:5d2h or t:1h-2h
r:<radius>Block radius from you. r:#global = whole server. r:#world_nether = one specific world.r:50
a:<action>Filter by action type. See table below.a:-block
i:<include>Target specific block/item IDs only.i:diamond_ore
e:<exclude>Exclude block/item IDs from the operation.e:dirt,stone

Action filters (the a: flag)

FilterWhat it matches
a:blockAll block changes (place + break). Use a:+block for placements only, a:-block for breaks only.
a:containerChest, barrel, shulker, hopper transactions. a:+container = items added, a:-container = items removed.
a:inventoryInventory changes (death drops, picked-up items).
a:itemItem drops and pickups in the world.
a:clickPlayer right-clicks (interactions with buttons, levers, doors).
a:commandCommands run by players.
a:chatChat messages.
a:signSign text changes.
a:killMob and player deaths.
a:sessionLogins and logouts.
a:usernamePlayer username changes.

Hashtag modifiers

ModifierEffect
#previewShow what would change without applying. Always run this before a big rollback.
#countReturn only the number of matching results.
#verboseExtra detail in the chat output.
#silentSuppress chat spam.
#optimizeOptimize MySQL tables (CoreProtect 2.15+). Run periodically on busy servers.

Common scenarios with the exact command

1. Investigate a broken block

/co i
<left-click the air where the block was, or click a remaining block>
/co i

Chat will tell you who broke it, what it was, and when. Toggling /co i off when done avoids accidental clicks logging as inspections.

2. Undo one griefer's actions in the last hour

/co rollback u:Griefer123 t:1h r:#global

Rolls back everything that user did in the last hour across the entire server. Other players' work is untouched.

3. Preview before committing

/co rollback u:Griefer123 t:1h r:#global #preview

Shows what the rollback would do without applying it. If the count is sane, run again without #preview.

4. Recover stolen items from a chest

<stand next to the chest>
/co lookup a:-container r:5 t:1h

Lists everyone who removed items from containers within 5 blocks in the last hour. Run /co rollback with the same flags to put them back.

5. Roll back lava grief without restoring legitimate dirt placement

/co rollback u:Griefer123 t:30m r:#global i:lava

Use i: to target only the lava placements. Dirt or other innocuous blocks the same player placed are left alone.

6. Undo a bad rollback

/co undo

Reverses the most recent rollback or restore. Useful when the #preview count was wrong.

7. See who logged in today

/co lookup a:session t:24h r:#global

8. Find who set a sign

/co lookup a:sign r:5 t:7d

Stand next to the sign and run the lookup. Useful for identifying offensive content authors.

Database setup: SQLite vs MySQL

CoreProtect ships with SQLite by default and writes everything to a single database.db file in the plugin folder. SQLite is perfect for servers up to about 15 concurrent players. Past that, lock contention during heavy logging can cause TPS dips.

When to switch to MySQL or MariaDB:

  • Server population regularly exceeds 15 players.
  • Rollbacks of large windows (24h+) cause visible lag.
  • The database.db file exceeds 5 GB.
  • You run multiple servers (BungeeCord / Velocity) and want a shared log database.

Switching is a one-time operation. As of CoreProtect 23.0, the /co migrate-db command moves your existing logs from SQLite to MySQL (or back) without losing data. Configure the MySQL connection in plugins/CoreProtect/config.yml first, then run the migrate command from the server console.

Performance tips

  • Always preview first. A rollback against u:Griefer t:7d r:#global on a busy world can touch millions of blocks and freeze the server for minutes. Use #preview + #count to size the operation.
  • Narrow with i: or e:. If a griefer placed lava, only roll back lava. Don't roll back every block they touched if you don't have to.
  • Schedule purges. Set purge-time in config.yml to a reasonable retention window (e.g. 30 days). Without purging, the database grows forever.
  • Optimize MySQL monthly. Run /co lookup #optimize once a month to keep query times fast.
  • Keep verbose chat off in production. Verbose output can DOS the chat queue during a big rollback.

Installing CoreProtect

  1. Download the latest CoreProtect JAR from docs.coreprotect.net or Modrinth.
  2. Drop the JAR into your server's plugins/ folder.
  3. Restart the server (not just /reload).
  4. On first boot CoreProtect creates the plugins/CoreProtect/config.yml and (for SQLite) the database.db file.
  5. Optional: edit config.yml to switch to MySQL and tune the action toggles (you can disable chat-logging if you have a Discord bridge already covering it).
  6. Restart once more after any config change.

Permissions for non-OP admins are granted via the coreprotect.* permission node (or individual coreprotect.inspect, coreprotect.rollback, etc. for fine-grained control).

The single most important habit: always #preview before a rollback you're not 100% sure about. The damage from a rollback gone wrong (rolling back a week of legitimate building) is harder to fix than the original grief.

Run CoreProtect on a managed Minecraft server

On Supercraft Minecraft hosting, CoreProtect is one-click installable from the panel's plugin manager, and the database lives on the same NVMe disk as your world for low-latency lookups. Pair this guide with the performance optimization article if your server is approaching the SQLite-to-MySQL threshold.

Tired of fighting this issue every patch?

Run a managed Minecraft server with us - we handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in 3 minutes, 5 datacenter regions, no contract.

See Minecraft hosting plans →
Top