JobsReborn-PatchPlaceBreak
No reviews yet
A place-and-break patch extension of JobsReborn plugin for Bukkit servers.
Paper is a fork of Spigot that adds its own plugin API on top of the Bukkit API. All Spigot plugins are compatible with paper, not all paper plugins are compatible with Spigot.
Spigot is a popular software for running dedicated servers that can load Plugins created with the Bukkit API.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
JobsReborn-PatchPlaceBreak [Addon]
A place-and-break patch extension of JobsReborn.
Place-and-break issue
With JobsReborn, it appears that placing a block and then breaking it is counted as a valid job action which leads to a payment for the player. Given this fact, it's straightforward to imagine a diamond ore being gathered with a Silk Touch pickaxe and immediately after being replaced again so that the process can be repeated indefinitely...
A solution with JobsReborn is to remove money and xp when a diamond ore is placed, preventing the previously described scenario. But it isn't perfect: if you expect to use money and xp boost for whatever reason, the amount of money to give when the block is broken will be higher than 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.
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
The patch is simple: when breaking or placing blocks, each one is tagged. 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 (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. 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. when replacing previously broken sapling repeatedly and in a brief time window).
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 it (being ephemeral or not), thus patching piston exploits.
As a comparison point, this behavior can have similarities with the one implemented by mcMMO plugin.
Easy and efficient, this does the trick.
Setup of the Spigot plugin
We expect here that you already have a Spigot server already set up with the JobsReborn plugin installed on it.
The server's version must be higher or equals to 1.17.x.
Download the latest .jar file from the
release section of this
repository and put it into the plugins/ folder, and you'll be done! After restarting the server,
the plugin should now appear green in the list displayed by the /plugins command.
If you wish to use this plugin on a lower version of the server, you should instead use the following version:
- 2.2.53 for Minecraft versions from 1.11 to 1.16 (included)
- 1.2.0 for Minecraft versions 1.8, 1.9 and 1.10
At this point, you should turn off all options of the "PlaceAndBreak" config part of JobsReborn. This would lead to a similar result as the following one:
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
GlobalBlockTimer:
# 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
Issues
If you find any bug or suspicious behavior, please don't hesitate to report it through "Discussion" section or directly through GitHub Issues section. I will do my best to react as quickly as possible.
How to support the project?
If you appreciate the project and want to support us, then you can consider putting a star on the GitHub repository. This will show us your interest in the project, and we will be grateful for that!
Licence
This project is under the MIT license.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers