Skip to content

Commit

Permalink
docs(readme): update & include feature overview section
Browse files Browse the repository at this point in the history
  • Loading branch information
Djaytan committed Aug 25, 2024
1 parent ca124c2 commit 86404f3
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,26 @@ for whatever reason, the amount of money to give when the block is broken will b
the amount to be retrieved when placing the same one. And... well... losing money and xp when you
place a block for decoration isn't very appreciated by players too.

The place-and-break patch provided by JobsReborn seems insufficient: you must specify **for
each block** a fix amount of time during which breaking the block again will not permit earning
money and xp. It's a first step forward, but can go even further. Specifying an unlimited time can
be limited too, because after 14 days maximum the placed blocks will not prevent the payment
anymore... And finally, piston exploit isn't taking into account at all.

So, this is why this addon exists: giving an easy and efficient solution to these problematics.
In fact, the place-and-break patch provided by JobsReborn already provides a better solution.
However, its main limitation comes from the maximum delay of 14 days before the protection is
released. Furthermore, you must specify **for each block** a fix amount of time during which
breaking the block again will not permit earning money and xp. Overall, that's a first step forward
for sure, but we can/should go even further. That's here this plugin takes place.

## Features

* Similar and performant patch-and-break protection than the one already provided by JobsReborn
(including piston patch, pair-players exploit, resiliency to server restarts, etc) ;
* Unlimited in time protection, discouraging once for all any exploiter in your server ;
* More fine-grained customization of restricted blocks (the list of blocks to be protected can be
inclusive or exclusive) in order to easily maximise the protection effectiveness while fine-tuning
performances ;
* Easy and fast setup with SQLite as a default persistence solution for quick discovery and
experimentation with this plugin (not recommended in production environment tho because of low
performances) ;
* Possibility to rely on a MySQL or a MariaDB database (much better performances observed) ;
* We keep you safe in case of configuration mistake by detecting issues early with strict
validation to ensure fail-fast and safe reaction from the plugin.

## How the patch works

Expand All @@ -48,18 +61,21 @@ This information is persisted across server restarts.
At payment time, if a BREAK, TNTBREAK or PLACE action involve an active "player" tag, the payment
will be cancelled.
It doesn't matter whose player is the author, so if one player places a block and another one breaks
it, the payment will be cancelled anyway.
it, the payment will be cancelled anyway (patching pair-players exploit).

There are two main behaviors that have subtle differences:

* When a block is placed, a tag is attached to it: This is useful to patch BREAK and TNTBREAK
actions (e.g. for breaking diamond ores) ;
actions (e.g. when breaking player-placed diamond ores) ;
* When a block is broken, a tag is attached to the location where it was: This is useful to
patch PLACE actions (e.g. for placing saplings).
patch PLACE actions (e.g. when replacing previously broken sapling).

*Note: the second behavior leads to "ephemeral" tags, that's to say, a tag which will be
applicable during a short-time only. The value is fixed to three seconds.*

Finally, when a piston moves a block, the tag just follows the block (being ephemeral or not), thus
patching piston exploits.

As a comparison point, this behavior can have similarities with the one implemented by
[mcMMO](https://www.spigotmc.org/resources/official-mcmmo-original-author-returns.64348/) plugin.

Expand Down Expand Up @@ -112,17 +128,32 @@ PlaceAndBreak:
# Enable blocks protection, like ore, from exploiting by placing and destroying same block again and again.
# Modify restrictedBlocks.yml for blocks you want to protect
Enabled: false
# Should we use new block protection method
# In most cases this is more efficient way to check for break/place protection and doesn't involve any cache or data saving into database
# Only works with 1.14+ servers
NewMethod: false
BlockTracker:
# Should we use BlockTracker plugin instead of built in block tracker
Enabled: false
# Enabling this we will ignore blocks generated in ore generators, liko stone, coublestone and obsidian. You can still use timer on player placed obsidian block
IgnoreOreGenerators: true
# For how long in days to keep block protection data in data base
# This will clean block data which ones have -1 as cooldown value
# Data base cleanup will be performed on each server startup
# This cant be more then 14 days
KeepDataFor: 14
# All blocks will be protected X sec after player places it on ground.
GlobalBlockTimer:
Use: false
Timer: 3
# All blocks will be protected X seconds after player places it
Place:
Use: false
# Time in seconds. This can only be positive number and no higher than 900
# If higher timers are needed then it can be defined in restrictedBlocks.yml file for each specific block
Timer: 3
Break:
Use: false
# Time in seconds. This can only be positive number and no higher than 60
# This is only to prevent player from placing blocks into same place and getting paid once more
Timer: 3
# Enable silk touch protection.
# With this enabled players wont get paid for broken blocks from restrictedblocks list with silk touch tool.
SilkTouchProtection: false
Expand Down

0 comments on commit 86404f3

Please sign in to comment.