Gamehost

CoreProtect: block logs and undoing grief on a Minecraft server

Install CoreProtect, find out who broke a block with the inspector, undo grief with /co rollback and #preview, and choose between SQLite and MySQL.

Gamehost team·4 min read·Updated:
Minecraft serverPlans from 2 GB RAM

Server ready a moment after payment. You can change the plan in the panel at any time, your world stays.

Someone wrecked a base and emptied the chests, and everyone swears it was not them. CoreProtect logs every block change and every chest transaction, and then undoes only what one person did. No need to restore the whole world from a backup.

Installation and engines

CoreProtect is a plugin for Paper, Purpur and Spigot. Install it from Plugins or download it from Modrinth or SpigotMC and upload it to the plugins folder. New game versions get a free release with some delay, so before you update your server, check that CoreProtect already supports the new version.

It starts logging right after the first start. It knows nothing about changes made before it was installed, so it is worth having from the first day of your server.

On Fabric, the equivalent is the Ledger mod, which has a similar inspector and rollback. On Forge and NeoForge, look for block logging mods for your game version.

The inspector: who did it

Type /co i to turn on the inspector. Now:

  • left-clicking a block shows who placed it,
  • right-clicking a chest shows who took what out of it and put what in,
  • right-clicking the side of a block shows the history of the space next to it,
  • placing a block shows what was broken in that spot before.

Typing /co i again turns the mode off. For a wider search use /co lookup, for example all blocks a player broke in the last day:

/co lookup u:Name t:1d a:-block

Undoing changes: rollback and restore

A rollback is built from parameters. The most important ones:

ParameterMeaningExample
u:player (several separated by commas)u:Name
t:how far backt:2h, t:3d
r:radius around you in blocksr:30, r:#global
a:action typea:block, a:container
b:, e:only these blocks, or all except themb:diamond_block

Always start with a preview. Add #preview and you will see the changes only on your own screen:

/co rollback u:Name t:3h r:40 #preview
/co apply
/co cancel

/co apply carries out the previewed rollback, /co cancel discards it. If you rolled back too much, /co restore with the same parameters brings the changes back, and /co undo reverses the last operation.

Do not run a rollback without u: and with a long time on r:#global. You would undo the work of every player on the whole map.

Database: SQLite or MySQL

By default CoreProtect stores everything in the file plugins/CoreProtect/database.db (SQLite). On a small server that is enough. The file grows every day, though, and after months of active play it can reach several gigabytes.

On a bigger server it is better to move the logs to MySQL:

  1. Create a database in Databases in the panel and note the host, port, database name, user and password.
  2. In plugins/CoreProtect/config.yml set:
use-mysql: true
mysql-host: HOST_FROM_PANEL
mysql-port: 3306
mysql-database: DATABASE_NAME
mysql-username: USER
mysql-password: PASSWORD
  1. Restart the server. Old logs from the SQLite file are not moved over automatically.

You delete old entries with /co purge t:90d (everything older than 90 days). In game, purge only removes data older than 30 days, from the console data older than one day. A smaller database means faster lookups and rollbacks.

Databases, backups and the plugin installer come with every plan on our Minecraft server hosting.

FAQ

No, CoreProtect is a plugin for Paper, Purpur and Spigot. On Fabric, the Ledger mod offers similar features.

Stand nearby and type /co rollback u:Name t:time r:radius #preview. If the preview looks right, confirm it with /co apply.

No. The plugin only knows changes logged since it started running. For older losses only a backup helps.

Delete old entries with /co purge t:90d or move the logs to a MySQL database from Databases, so they do not take up space in your server files.

Give their group the coreprotect.inspect permission, and for undoing changes coreprotect.rollback and coreprotect.restore, for example in LuckPerms.

Your own Minecraft server

Plans from 3.79 € a month, set up in a few minutes and managed from one panel.

See plans