CoreProtect Guide: Commands, Rollbacks and Setup
On this page
CoreProtect records almost everything that happens on a Minecraft server: blocks placed and broken, chests opened, items taken, explosions, chat and commands. When someone griefs a build, you can see who did it and undo it with one command, without restoring a backup and losing everyone else's progress.
This guide covers installing CoreProtect, the inspector, lookups, rollbacks and restores, purging old data and choosing a database.
Install CoreProtect
CoreProtect is a plugin for Paper, Spigot and Folia. The current release, CoreProtect 24.1, supports Minecraft 1.14 up to 26.2.
- Download it free from Modrinth or Hangar. Builds for supporters on Patreon get some features earlier.
- Put the jar in the
pluginsfolder and restart the server. Uploading plugins is covered in how to install Minecraft plugins. - CoreProtect starts logging straight away, into a SQLite file at
plugins/CoreProtect/database.db. No setup is needed.
Check the version list before you update Minecraft: when a new Minecraft version comes out, wait for a CoreProtect release that supports it.
The inspector: who touched this block?
Type /co i to turn the inspector on. While it is on:
- Left-click a block to see who placed or broke it, and when.
- Right-click a block, or the air next to a block, to see the history of that spot.
- Right-click a chest or other container to see what was put in and taken out.
Type /co i again to turn it off. /co near shows the latest changes within 5 blocks of you.
Lookups: search the history
/co lookup, or /co l, searches the log with parameters you can combine:
| Parameter | Meaning | Example |
|---|---|---|
u: | User, several separated by commas, or a cause such as #tnt, #creeper, #fire | u:Steve,Alex |
t: | Time back: w, d, h, m, s, combinable, or a range | t:2d, t:5d2h, t:1h-2h |
r: | Radius in blocks around you, a world, or everywhere | r:20, r:#world_nether, r:#global |
a: | Action: block, +block, -block, container, chat, command, kill, session and more | a:-block |
i: / e: | Include or exclude blocks, items or entities | i:diamond_block |
Examples:
/co l u:Steve t:2d a:-block /co l t:1h r:30 a:container /co l u:Steve t:7d a:chat
The first shows blocks Steve broke in the last two days, the second what was taken from or put into containers within 30 blocks in the last hour. Results are paged; /co l 2 shows the next page.
Roll back grief, and restore it
/co rollback (/co rb) undoes changes, using the same parameters as a lookup. /co restore (/co rs) puts them back.
/co rollback u:Griefer t:1d r:#global #preview /co rollback u:Griefer t:1d r:#global /co rollback t:30m r:15 u:#tnt /co restore u:Griefer t:1d r:#global
- Preview first.
#previewshows the result only to you; nothing changes until you run the command without it. - Mind the radius. A rollback without
r:covers 10 blocks around you. For a griefer who travelled, addr:#global. - Always give a user or a short time. A rollback of everyone over a long time also undoes honest players' building.
- Made a mistake?
/co undoreverses your last rollback or restore.
Run CoreProtect on a server with MySQL included: HytHost Minecraft hosting starts at €2.59/mo.
See Minecraft plansPurge old data
CoreProtect keeps everything until you delete it, so the database grows for as long as the server runs. Purge old data now and then:
/co purge t:30d
This deletes everything older than 30 days. In game you can only purge data older than 30 days; from the console the minimum is 24 hours. Add r:#world_name to purge one world only. On MySQL, add #optimize to give the freed disk space back. Pick a period that covers how long it usually takes your players to notice grief.
SQLite or MySQL
Out of the box CoreProtect uses SQLite, a single file in its folder. That is fine for most servers and needs no setup. Use MySQL when you want the data outside the server folder, or when several servers of a network should log to one database.
To switch, create a database, then edit plugins/CoreProtect/config.yml:
use-mysql: true table-prefix: co_ mysql-host: DB_HOST mysql-port: 3306 mysql-database: DB_NAME mysql-username: DB_USER mysql-password: DB_PASSWORD
Restart the server and check /co status. Decide early: switching does not move the data you already logged, and the migration command needs a Patreon build. Every HytHost Minecraft plan includes MySQL databases, which you create in the panel's Databases tab.
Permissions for your staff
Operators have every CoreProtect command through coreprotect.*. For moderators who are not operators, give only what they need with a permissions plugin such as LuckPerms:
coreprotect.inspectandcoreprotect.lookupto investigate;coreprotect.rollbackandcoreprotect.restorefor trusted staff only;coreprotect.purgeandcoreprotect.reloadfor admins.
CoreProtect pairs well with EssentialsX for the everyday commands your staff use.
Frequently asked questions
Run /co rollback u:PlayerName t:1d r:#global #preview to see the result, then the same command without #preview. Adjust the time to cover when the grief happened.
A rollback without r: only covers 10 blocks around you. Add r:#global or a larger radius, and check the time covers the whole period.
CoreProtect writes its log in a separate queue, so normal play is not slowed. Big lookups and rollbacks over long periods take longer, and the database grows over time, so purge old data regularly.
The plugin is for Paper, Spigot and Folia. CoreProtect also publishes a separate Fabric version; check its download page for the Minecraft versions it supports.
Yes. /co undo reverses your last rollback or restore, and /co restore with the same parameters puts back what a rollback removed.
Protect your builds
HytHost Minecraft hosting runs Paper with plugins like CoreProtect and includes MySQL databases on every plan, from €2.59/mo.
Live chat 8 AM – 11 PM (Chișinău time) · tickets answered during business hoursWas this guide helpful?