Updated commands.md to match latest docs

This commit is contained in:
Intelli 2021-07-13 19:29:55 -06:00
parent b4e9f52022
commit 3d3f0503d6
7 changed files with 285 additions and 247 deletions

View file

@ -11,4 +11,6 @@ CoreProtect is a blazing fast data logging and anti-griefing tool for Minecraft
Contributing Contributing
------ ------
This project is still under development, and is not yet ready for testing or contributions. This project is still under development, and is not yet ready for testing or contributions.
[![Netlify Status](https://api.netlify.com/api/v1/badges/c1d26a0f-65c5-4e4b-95d7-e08af671ab67/deploy-status)](https://app.netlify.com/sites/coreprotect/deploys)

View file

@ -1,235 +1,268 @@
# Commands # CoreProtect Commands
---
You can access the commands using either `/coreprotect` or it's aliases `/core` or `/co`. You can access the commands using either `/coreprotect` or it's aliases `/core` or `/co`.
___
## Command Overview
## Command Overview
| Command | Description |
| --- | --- | | Command | Description |
| [help](#help) | Display a list of commands | | --- | --- |
| [inspect](#inspect) | Toggle the inspector | | [/co help](#co-help) | Display a list of commands |
| [rollback](#rollback) | Rollback block data | | [/co inspect](#co-inspect) | Toggle the inspector |
| [restore](#restore) | Restore block data | | [/co lookup](#co-lookup) | Lookup block data |
| [lookup](#lookup) | Advanced block data lookup | | [/co rollback](#co-rollback) | Rollback block data |
| [purge](#purge) | Delete old block data | | [/co restore](#co-restore) | Restore block data |
| [reload](#reload) | Reload the configuration file | | [/co purge](#co-purge) | Delete old block data |
| [status](#status) | View the plugin status | | [/co reload](#co-reload) | Reload the configuration file |
| [near](#near) | Alias for lookup with a radius of 5 | | [/co status](#co-status) | View the plugin status |
| [undo](#undo) | Revert a rollback/restore |
### Alias Commands
## Commands Detailed
| Command | Description |
### help | --- | --- |
| /co near | Performs a lookup with a radius of 5 |
Usage: | /co undo | Revert a rollback/restore via the opposite action|
`/co help`
---
Displays the list of available commands
## Commands
Example Output:
*Detailed command information is listed below.*
```text
----- CoreProtect Help ----- ### /co help
/co help <command> - Display more info for that command. Display a list of commands in-game.
/co inspect - Turns the block inspector on or off. ___
/co rollback <params> - Rollback block data.
/co restore <params> - Restore block data. ### /co inspect
/co lookup <params> - Advanced block data lookup. Enable the inspector. Type the command again to disable it. You can also use just "/co i".
/co purge <params> - Delete old block data. ___
/co reload - Reloads the configuration file.
/co status - Displays the plugin status. ### /co lookup
``` Perform a lookup. Nearly all of the parameters are optional.
### inspect | Command | Parameters |
| --- | --- |
Usage: | /co lookup | `u:<user> t:<time> r:<radius> a:<action> i:<include> e:<exclude>` |
`/co inspect` | /co l | *`/co lookup <params>`* |
Alias: `/co i` #### Parameters
| Parameter | Description |
Enables the in-game inspector. Once activated, right-click (use) button on blocks to get detailed history of that specific block. Run the command again to return your controls to normal. | --- | --- |
| [`u:<user>`](#uuser) | Specify the user(s) to lookup. |
### lookup | [`t:<time>`](#test2) | Specify the amount of time to lookup. |
| [`r:<radius>`](#test3) | Specify a radius area to limit the lookup to. |
Usage: | [`a:<action>`](#test4) | Restrict the lookup to a certain action. |
`/co lookup <filter syntax>` See: [Filter Syntax](#filter-syntax) | [`i:<include>`](#test5) | Include specific blocks/entities in the lookup. |
| [`e:<exclude>`](#test6) | Exclude blocks/entities from the lookup. |
Alias: `/co l` | [`#<hashtag>`](#test7) | Add a hashtag to perform additional actions. |
Search through block data using parameters from filter syntax. #### Pagination
#### Pagination If multiple pages are returned, use the command `/co lookup <page>` to switch pages.
To change the number of lines displayed on a page, use `/co lookup <page>:<lines>`.
If multiple pages are returned, use the command `/co lookup <page #>` to switch pages.
To change the number of lines displayed on a page, use the command `/co lookup <page #>:<# of lines>`. > *For example, `/co l 1:10` will return 10 lines of data, starting at the first page.*
Example: `/co l 1:10` will return 10 lines of data, starting at the first page. ---
### rollback ### /co rollback
Perform a rollback. Uses the same [parameters](#parameters) as /co lookup.
Usage: *Rollbacks can be used to revert player actions.*
`/co rollback <filter syntax>` See: [Filter Syntax](#filter-syntax)
| Command | Parameters |
Alias: `/co rb` | --- | --- |
| /co rollback | `u:<user> t:<time> r:<radius> a:<action> i:<include> e:<exclude>` |
Undo all block data which matches the filter. | /co rb | *`/co rollback <params>`* |
### restore ---
`/co restore <filter syntax>` See: [Filter Syntax](#filter-syntax) ### /co restore
Perform a restore. Uses the same [parameters](#parameters) as /co lookup.
Alias `/co rs` *Restoring can be used to undo rollbacks or to restore player actions.*
Restoring can be used to undo rollbacks. This will playback all block data which matches the filter that may have been previously rolled back. | Command | Parameters |
| --- | --- |
### purge | /co restore | `u:<user> t:<time> r:<radius> a:<action> i:<include> e:<exclude>` |
| /co rs | *`/co restore <params>`* |
`/co purge t:<time> r:<world>`
---
Purge old block data. Useful for freeing up storage space if you don't need the older data.
### /co purge
Example: `/co purge t:30d` will delete all data older than one month, and only keep the last 30 days of data. Purge old block data. Useful for freeing up space on your HDD if you don't need the older data.
If used in-game, only data older than 30 days can be purged. If used from the console, only data older than 24 hours can be purged.
| Command | Parameters |
In CoreProtect v19+ | Specify World | --- | --- |
| /co purge | `t:<time> r:<world>` |
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.
For example, `/co purge t:30d` will delete all data older than one month, and only keep the last 30 days of data.
In CoreProtect v2.15+ | Optimize tag for MySQL
> If used in-game, only data older than 30 days can be purged.
Add `#optimize` to the end of the command like: `/co purge t:30d #optimize` will also optimize your tables and reclaim disk space. > If used from the console, only data older than 24 hours can be purged.
This option is only available when using MySQL/MariaDB, as SQLite purges do this by default.
**Purging Worlds**
*Please note adding the #optimize option will significantly slow down your purge, and is generally unnecessary.* You can also optionally specify a world in CoreProtect v19+.
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.
## Examples
**MySQL Optimization**
### rollback Examples 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.
By default, if no radius is specified, a radius of 10 will be applied, restricting the rollback to within 10 blocks of you. Use `r:#global` to do a global rollback.
*Please note adding the #optimize option will significantly slow down your purge, and is generally unnecessary.*
Rollback Notch 1 hour (with default radius of 10):
>`/co rollback Notch t:1h` ___
PREVIEW rolling back both Notch & Intelli 1 hour (with default radius of 10): ### /co reload
>`/co rollback u:Notch,Intelli t:1h #preview` Reloads the configuration file.
___
Rollback Notch 23 hours and 17 minutes (with default radius of 10):
>`/co rollback u:Notch t:23h17m` ### /co status
Displays the plugin status and version information.
Rollback ONLY stone placed/broken by Notch within the last hour (with default radius of 10): ___
>`/co rollback u:Notch t:1h b:1`
Rollback ONLY stone BROKEN by Notch within the last hour (with default radius of 10): ## Parameter Details
>`/co rollback u:Notch t:1h b:stone a:-block`
### `u:<user>`
Rollback EVERYTHING Notch did in the last hour EXCEPT for stone and dirt placed/broken:
>`/co rollback u:Notch t:1h r:#global e:stone,dirt` *You can specify a single user or multiple users.*
Rollback griefing Notch did in the last hour that is within 20 blocks of you: * Example: `u:Notch`
>`/co rollback u:Notch t:1h r:20` * Example: `u:Notch,Intelli`
Rollback griefing Notch did in the last hour ONLY in the Nether: ---
>`/co rollback u:Notch t:1h r:#nether`
### `t:<time>`
Rollback everything done in the last 15 minutes by anyone within 30 blocks of you:
>`/co rollback t:15m r:30` *You can specify weeks, days, hours, minutes, and seconds.*
*Time amounts can be combined, and decimals may be used.*
Rollback everything done in the last 15 minutes in a WorldEdit selection:
>`/co rollback t:15m r:#worldedit` * Example: `t:2w,5d,7h,2m,10s`
* Example: `t:5d2h`
### lookup examples * Example: `t:2.50h` *(2 and a half hours)*
Lookup commands are generally the same as rollback commands. The primary difference is that a default radius is not applied to lookups, meaning all lookup commands do a global search by default. ---
Lookup all diamond ore mined in the last hour: ### `r:<radius>`
>`/co lookup b:56 t:1h a:-block`
*A numeric radius targets within that many blocks of your player location.*
Lookup all chat messages sent by Notch in the last 30 minutes:
>`/co lookup u:Notch t:30m a:chat` * Example: `r:10` *(target within 10 blocks of your location)*
* Example: `r:#world_the_end` *(target a specific world)*
Lookup all logins ever done by Notch: * Example: `r:#global` *(target the entire server)*
>`/co lookup u:Notch a:login` * Example: `r:#worldedit` or `r:#we` *(target a WorldEdit selection)*
Lookup all logins ever done by Notch: ---
>`/co lookup u:Notch a:login`
### `a:<action>`
Lookup previous usernames used by Notch:
>`/co lookup u:Notch a:username` *Restrict the command to a specific action*
## Filter Syntax * Example: `a:+block` *(only include placed blocks)*
`u:<user>` - Specify a user to rollback. #### Actions
>Example: `u:Notch` | Action | Description |
| --- | --- |
You can also combine multiple users. | `a:block` | blocks placed/broken |
>Example: `u:Notch,Intelli` | `a:+block` | blocks placed |
| `a:-block` | blocks broken |
`t:<time>` - Specify the amount of time to rollback | `a:chat` | messages sent in chat |
| `a:click` | player interactions |
You can specify weeks,days,hours,minutes, and seconds. | `a:command` | commands used |
| `a:container` | items taken from or put in chests |
>Example: `t:2w,5d,7h,2m,10s` | `a:+container` | items put in chests |
| `a:-container` | items taken from chests |
You can pick and choose time amounts. | `a:inventory` | items dropped or picked up by players |
>Example: `t:5d2h` | `a:+inventory` | items picked up by players |
| `a:-inventory` | items dropped by players |
You can also use decimals. | `a:item` | items dropped, picked up, taken from, or put in chests |
>Example: `t:2.50h` (2 and a half hours) | `a:+item` | items picked up or put in chests |
| `a:-item` | items dropped or taken from chests |
`r:<radius>` - Specify a radius. You can use this to only rollback blocks near you. | `a:kill` | mobs/animals killed |
| `a:session` | player logins/logouts |
You can specify a number (e.g. `r:5`), a world (e.g. `r:#world_the_end`), a global rollback (`r:#global`), or a WorldEdit selection (`r:#worldedit` or `r:#we`) | `a:+session` | player logins |
| `a:-session` | player logouts |
For example, the following would only rollback damage within 10 blocks of where you are standing: `r:10` | `a:sign` | messages written on signs |
| `a:username` | username changes |
`a:<action>` - Restrict the lookup to a certain action
For example, if you wanted to only rollback blocks placed, you would use `a:+block` ---
Here's a list of all the actions: ### `i:<include>`
| Syntax | Description | *Can be used to specify a block/item/entity.*
| --- | --- |
| `a:block` | blocks placed/broken | * Example: `i:stone` *(only include stone)*
| `a:+block` | blocks placed | * Example: `i:stone,oak_wood,bedrock` *(specify multiple blocks)*
| `a:-block` | blocks broken |
| `a:chat` | messages sent in chat | > You can find a list of block type IDs at [https://coreprotect.net/wiki-blocks](https://coreprotect.net/wiki-blocks).
| `a:click` | player interactions |
| `a:command` | commands used | ---
| `a:container` | items taken from or put in chests |
| `a:+container` | items put in chests | ### `e:<exclude>`
| `a:-container` | items taken from chests |
| `a:inventory` | items dropped or picked up by players | *Can be used to exclude a block/item/entity/user.*
| `a:+inventory` | items picked up by players |
| `a:-inventory` | items dropped by players | * Example: `e:tnt` *(exclude TNT)*
| `a:item` | items dropped, picked up, taken from, or put in chests |
| `a:+item` | items picked up or put in chests | ---
| `a:-item` | items dropped or taken from chests |
| `a:kill` | mobs/animals killed | ### `#<hashtag>`
| `a:session` | player logins/logouts |
| `a:+session` | player logins | Add a hashtag to the end of your command to perform additional actions.
| `a:-session` | player logouts |
| `a:sign` | messages written on signs | * Example: `#preview` *(perform a rollback preview)*
| `a:username` | username changes |
#### Hashtags
`b:<blocks>` - Restrict the rollback to certain block types. | Hashtag | Effect |
| --- | --- |
For example, if you wanted to only rollback stone, you would use `b:stone` | `#preview` | Preview a rollback/restore |
You can specify multiple blocks, such as `b:stone,oak_wood,bedrock` | `#count` | Return the number of rows found in a lookup query |
| `#verbose` | Display additional information during a rollback/restore |
You can find a list of block type IDs at the [Gamepedia Minecraft Wiki](https://minecraft.fandom.com/wiki/Java_Edition_data_values) | `#silent` | Display minimal information during a rollback/restore |
`e:<exclude>` - Exclude certain block types from the rollback. ___
For example, if you don't want TNT to come back during a rollback, you would type `e:tnt`
## Example Commands
`#<hashtag>` - Add a hashtag to the end of your command to perform additional actions.
For example, to perform a rollback preview, you would use `#preview` ### Example Rollback Commands
Here's a list of available hashtags: By default, if no radius is specified, a radius of 10 will be applied, restricting the rollback to within 10 blocks of you. Use `r:#global` to do a global rollback.
| Hashtag | Effect | * `/co rollback Notch t:1h`
| --- | --- | *(rollback Notch 1 hour (with default radius of 10))*
| `#preview` | Preview a rollback/restore | * `/co rollback u:Notch,Intelli t:1h #preview`
| `#count` | Return the number of rows found in a lookup query | *(PREVIEW rolling back both Notch & Intelli 1 hour (with default radius of 10))*
| `#verbose` | Display additional information during a rollback/restore | * `/co rollback u:Notch t:23h17m`
| `#silent` | Display minimal information during a rollback/restore | *(rollback Notch 23 hours and 17 minutes (with default radius of 10))*
* `/co rollback u:Notch t:1h i:stone`
*(rollback ONLY stone placed/broken by Notch within the last hour (with default radius of 10))*
* `/co rollback u:Notch t:1h i:stone a:-block`
*(rollback ONLY stone BROKEN by Notch within the last hour (with default radius of 10))*
* `/co rollback u:Notch t:1h r:#global e:stone,dirt`
*(rollback EVERYTHING Notch did in the last hour EXCEPT for stone and dirt placed/broken)*
* `/co rollback u:Notch t:1h r:20`
*(rollback griefing Notch did in the last hour that is within 20 blocks of you)*
* `/co rollback u:Notch t:1h r:#nether`
*(rollback griefing Notch did in the last hour ONLY in the Nether)*
* `/co rollback t:15m r:30`
*(rollback everything done in the last 15 minutes by anyone within 30 blocks of you)*
* `/co rollback t:15m r:#worldedit`
*(rollback everything done in the last 15 minutes in a WorldEdit selection)*
---
### Example Lookup Commands
Lookup commands are generally the same as rollback commands. The primary difference is that a default radius is not applied to lookups, meaning all lookup commands do a global search by default.
* `/co lookup i:diamond_ore t:1h a:-block`
*(lookup all diamond ore mined in the last hour)*
* `/co lookup u:Notch t:30m a:chat`
*(lookup chat messages sent by Notch in the last 30 minutes)*
* `/co lookup u:Notch a:login`
*(lookup all logins ever done by Notch)*
* `/co lookup u:Notch a:login`
*(lookup all logins ever done by Notch)*
* `/co lookup u:Notch a:username`
*(lookup previous usernames used by Notch)*
___

View file

@ -12,10 +12,8 @@ If you'd like to modify the logging settings for a specific world, simply do the
Secondary configuration files override the value specified in config.yml. If you leave an option out of a secondary configuration file, then the option specified in config.yml will be used. Secondary configuration files override the value specified in config.yml. If you leave an option out of a secondary configuration file, then the option specified in config.yml will be used.
### Examples #### Examples
* If you'd like to disable all logging for the End, copy the `config.yml` file to `world_the_end.yml` (matching the folder name for the world). Then, simply disable all logging options within the new file. * If you'd like to disable all logging for the End, copy the `config.yml` file to `world_the_end.yml` (matching the folder name for the world). Then, simply disable all logging options within the new file.
* If you just want to disable entity death logging in the Nether, but keep all other logging options the same, simply create a file named `world_nether.yml` containing the text "rollback-entities: false". * If you just want to disable entity death logging in the Nether, but keep all other logging options the same, simply create a file named `world_nether.yml` containing the text "rollback-entities: false".
## Disabling Logging ## Disabling Logging
@ -27,8 +25,7 @@ To disable logging for specific users or commands, simply do the following:
3. Either restart your server, or type "/co reload" in-game. 3. Either restart your server, or type "/co reload" in-game.
This can be used to disable logging for non-player users, such as "#tnt". For example, if you'd like to disable logging for the user "Notch" and for TNT explosions, the blacklist.txt file would look like this: This can be used to disable logging for non-player users, such as "#tnt". For example, if you'd like to disable logging for the user "Notch" and for TNT explosions, the blacklist.txt file would look like this:
```text ```text
Notch Notch
#tnt #tnt
``` ```

6
docs/css/extra.css Normal file
View file

@ -0,0 +1,6 @@
/*Customization for blockquote appearance*/
blockquote {
border-left: 5px solid #ccc;
padding-left: 20px;
margin-left: 0px!important;
}

View file

@ -1,8 +1,6 @@
site_name: CoreProtect Documentation site_name: CoreProtect Documentation
site_url: https://docs.coreprotect.net/ site_url: https://docs.coreprotect.net
theme: readthedocs theme: readthedocs
repo_url: https://github.com/PlayPro/CoreProtect repo_url: https://github.com/PlayPro/CoreProtect
nav: extra_css:
- Home: index.md - css/extra.css
- Configuration: config.md
- Commands: commands.md

2
netlify.toml Normal file
View file

@ -0,0 +1,2 @@
[build]
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs/"

View file

@ -1 +1 @@
mkdocs mkdocs