Articles on: Plugin Setup

How to install and use CoreProtect [Java]

In this article you are going to learn how to install and use CoreProtect

Installation


Download the CoreProtect plugin from here
After you download the CoreProtect plugin drop it into your plugins folder.
You just successfully installed CoreProtect. Before we get started, we need to configure the storage of data

CoreProtect Data Storage - Important!



CoreProtect is known to log almost everything and anything that happens in your minecraft server. As a result, you need to ensure you use the correct data storage type for your minecraft server. Let's go over the two recommended types and what they're useful for

H2 Storage ( Default )



This will make all of coreprotect's actions be logged to a single .h2 file which would contain everything about your coreprotect data. This is the ideal solution for many as it provides easy backups of your data.

MySQL



You may use our databases and create a database for CoreProtect to use. However, we have limits and restrictions when it comes to having big databases in our system, so please be wary of that. You can configure the database details and start using mysql as your storage type

Reducing your coreprotect database size



After a month or two, your coreprotect database may start becoming huge. And we're talking about sizes in tens of gigabytes. The most commonly used method to reduce your storage is to get rid of old data. You can get rid of old data by using /co purge.
It is also advised to disable useless logging such as lava/water flow and anything else that may not be required to significantly reduce storage usage. Here's our recommended list of things to enable/disable;
block-burn, entity-change, entity-kills, leaf-decay, mushroom-growth, vine-growth, water-flow, lava-flow, liquid-tracking, player-messages, player-commands
You can also copy/paste this into the config from the entity-change ( line 74 ) section, make sure to remove the already existing text below line 74

entity-change: false
entity-kills: false
sign-text: true
buckets: true
leaf-decay: false
tree-growth: true
mushroom-growth: false
vine-growth: false
portals: true
water-flow: false
lava-flow: false
liquid-tracking: false
item-transactions: true
item-drops: true
item-pickups: true
hopper-transactions: true
player-interactions: true
player-messages: false
player-commands: false
player-sessions: true
username-changes: true
worldedit: true


Configuring the plugin



If you want to disable/enable logging of certain actions, you may do so here
Important! - You can also specify a default and maximum radius to use when using rollback. It is advised to keep a low max rollback radius, as if you keep it higher than 100 ( the default ), your server may struggle and crash to rollback things
You can also configure your SQL credentials here

Getting Started



Once CoreProtect is installed it will start logging what players are doing. If a player breaks or places a block it will log it in the database. It also logs most things that happen in Minecraft, this can be configured more in config.yml of course
To check what players are doing you can type command /co inspect and now you can click anything you want and it will tell you who placed it.

If you want to see who broke a block you can run the same command and place a block where you want to see who broke the block that was previously there


Using /co rollback & it's parameters



This is a very powerful feature. It lets you rollback things that have happened in a certain area to a certain time you wish to rollback to. This is useful to undo griefing and other things. There are a lot of parameters you can use, see below!
This was copied directly from the coreprotect documentation, for examples and much more deatil, you may check it here

Parameter Details

u:<user>
You can specify a single user or multiple users.

t:<time>
You can specify weeks, days, hours, minutes, and seconds.
Time amounts can be combined, and decimals may be used.

r:<radius>
A numeric radius targets within that many blocks of your player location.

a:<action>
Restrict the command to a specific action

i:<include>
Can be used to specify a block/item/entity.

e:<exclude>
Can be used to exclude a block/item/entity/user.


Sample /co rollback commands



Rolling back all actions done by the user Intelli made in the last 24 hours within a 50 block radius - /co rollback t:24h u:Intelli r:50
Rolling back only blocks broken AND blocks placed by the users Intelli, Notch, Devil & Herobrine made in the last 72 hours within a 100 block radius - /co rollback t:72h u:Intelli,Notch,Devil,Herobrine r:100 a:+block a:-block
You may see all examples here

Using /co purge



You can purge coreprotect logs from a specific world and in a specific timeframe to reduce storage size/just clean up old logs you may no longer need.
For example, /co purge t:30d r:#world_nether will delete all data older than one month in the Nether, without deleting data in any other worlds.

MySQL Optimization


In CoreProtect v2.15+, adding "#optimize" to the end of the command (e.g. /co purge t:30d #optimize) will also optimize your tables and reclaim disk space. This option is only available when using MySQL, as SQLite purges do this by default.

Extra Commands


CoreProtect has lots of commands which we will provide a brief description of here.
/co help Displays a list of commands
/co inspect Toggles the inspector
/co lookup Lookup block data
/co restore Restores block data
/co purge Delete old block data
/co reload Reloads the CoreProtect configuration file
/co status Views the plugins status
Still need help on how to use these commands? Refer to the official CoreProtect documentation

CoreProtect can go a really long way when you want to log each and every thing that happens in your minecraft server. From looking up fine-tuned actions to restoring specific items on specific parameters, this powerful plugin is a must-have for every server

Article made by vijaypondini#0001 ( ID 631466030023049217 )

Updated on: 14/06/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!