BlockSaver
Summary
BlockSaver is a plugin intended to allow players to protect their structures from griefers without causing a massive imbalance to PVP/Griefer/Builder dynamics.
The plugin is functional and running successfully on production servers.
Overview
BlockSaver is the block protection plugin written for MinerApocalypse by Indiv0 . The plugin is meant to re-create features of Citadel as well as other block protection plugins and ideas, in order to counteract the griefer-builder imbalance which is prevalent on the MA server.
The plugin has a variety of configuration options, which can be viewed in the config.yml for the plugin. Configuration values are thoroughly documented in the configuration file, but any discrepancies or confusions will be explained in the Configuration section below.
Video
An example video on how to use the plugin can be found here, graciously provided by one of MinerApocalypse's amazing server administrators - Diecron.
Features
- Reinforce blocks
- Permissions support
- Control strength of reinforcement
- Control reinforcement intricacies (TNT and Fire resistance, etc.)
- Feedback for all plugin actions (including toggleable text feedback)
- Optional Prism integration (for logging, roll-backs, and restorations)
- Optional WorldEdit integration (for mass-reinforcement via WorldEdit selections)
- More stuff I'm forgetting about right now
Definitions
A list of helpful abbreviations and definitions is provided, to cut down on explanation time and difficulty. It is suggested to read this before proceeding to the configuration or to other sections of the wiki, as both of these areas rely on these terms and abbreviations.
BlockSaver - the plugin itself.
Reinforcement - the act of using a material, whether it be obsidian or diamonds, etc., to "reinforce" a block, by increasing the number of times it must be broken before it disappears. The item used to reinforce is used up in this process.
Reinforcement Value (RV) - the current "health" of the block, and is defined as the remaining of times the block must be broken before the reinforcement is removed (note: a block which has no reinforcement has an RV of 0)
Reinforcement Value Coefficient (RVC) - the maximum RV for the block. By default the RVC for each block makes it so that to bring the RV from RVC to 0 takes as long as it would take to break obsidian.
Field - a bug wherein an air block has an RV associated with it. Currently there is no known way to produce fields.
Healing Timer (HT) - the timer, which, if enabled, controls the amount of time until a reinforced block is healed.
Core Functionality
Every option in the plugin is independent of the others and may be configured as needed.
By default, the plugin is configured for "obsidian mode", as this is the type of protection needed on the MinerApocalypse server. However, this only refers to the default configuration.
Obsidian mode is a mode in which the plugin functions mainly as described by ams2990 . The requisites for this mode are:
- Only obsidian is used to reinforce blocks.
- Reinforcement values for blocks are instantly set to their respective RVCs when reinforced with an obsidian block.
- A block MUST be broken by a specific tool, with the plugin configured for ONE OF:
- The reinforcement must be broken with a diamond pickaxe (hence obsidian mode)
- The reinforcement must be broken with the diamond equivalent of the tool used to break it (e.g. diamond axe for logs, diamond spade for dirt)
- It is also recommended (and assumed when OM is mentioned), but not required that in this mode the blocks are configured to function as obsidian (i.e. immovable, full TNT resistance, etc.)
Permissions
Commands
Command | Permission | Usage |
/blocksaver autoenforce | blocksaver.blocksaver.autoenforce | Toggles auto-reinforcement mode |
/blocksaver feedback | blocksaver.blocksaver.feedback | Toggles text-feedback on or off |
/blocksaver reinforce | blocksaver.blocksaver.reinforce | Reinforces the current WorldEdit selection |
While enabled, auto-enforcement mode will automatically reinforce placed blocks with items from the player's inventory.
Text-based feedback is simply the option of having the plugin tell you what is happening in your chat window, if you are not able to partake in the auditory cues (i.e. your volume is down), or if you simply do not know which sound represents what action.
The reinforce command simply reinforces a WorldEdit selected region. This obviously requires WorldEdit to be running on the server, and for BlockSaver to be configured to hook into WorldEdit.
Feedback
Permission | Usage |
blocksaver.feedback | Controls what feedback the player receives |
blocksaver.feedback.reinforce.success | Feedback for a successful reinforcement |
blocksaver.feedback.reinforce.fail | Feedback for a failed reinforcement |
blocksaver.feedback.damage.success | Feedback for a successful reinforcement damage |
blocksaver.feedback.damage.fail | Feedback for a failed reinforcement damage |
blocksaver.feedback.hit | Feedback for an improper tool use |
blocksaver.feedback.permissions | Feedback for insufficient permissions |
Reinforcement
Permission | Usage |
blocksaver.damage | Allows the player to damage reinforced blocks |
blocksaver.reinforce | Allows the reinforcement of blocks |
blocksaver.exempt | Exempts the player from reinforced block restrictions |
Configuration
There are many different configuration options which offer a great degree of customizability for the plugin, allowing for rapid testing and optimization for your server. The configuration as it appears in the config.yml is exactly the configuration used on the MinerApocalypse server (ergo, using obbsidian mode).
Usage
Installation
If you wish to run this plugin without Prism integration (for roll-backs and restores) then you MUST set enableLogging in the config.yml to false.
Similarly, to disable WorldEdit integration (for the reinforce command), set integrateWorldEdit to false.
Reinforcing
Blocks are reinforced by left-clicking on a block which can be reinforced with an item used for reinforcement in your hand.
For example, if using the default config, you can do this by left-clicking on a stone block with an obsidian block in your hand.
Without player interaction (e.g. without being hit, etc.), reinforced blocks appear identical to normal blocks.
Healing
The healing timer is begun as soon as a block is broken. Every time a block's RV is decreased (i.e. every time it is successfully broken), the timer is reset. This means that if HT is set to 5, you have 5 seconds since the last time you broke the block before it heals.
A block will heal to its RVC once the timer elapses. This is meant to simulate block-break time, as it occurs with regular blocks.
Feedback
Blocks, when interacted with, provide feedback. All actions related to BS feature non-toggle-able auditory feedback. Text-based feedback is available for every action as well, but is toggle-able. Particle effects are available while a block is being broken (either by the player or by things such as TNT).
All visual effects use fireworks effects of varying colours to signify the health of a block. Alternative forms of feedback are coming soon.
Actions Which Provide Feedback
- When hit (not broken)
- This feedback will vary depending on whether or not your current tool can break the block.
- When reinforced successfully
- When reinforcement fails
- When a block is broken (player or otherwise)
- When a block fails to be broken (e.g. wrong tool)
- Failing to have the correct permissions for an action
Prism Integration
In order to enable Prism integration, under the api: configuration heading in Prism's config.yml, you must add BlockSaver as a plugin which is allowed to access the API.
Notes
Assuming obsidian mode is used, griefs will be no worse (and actually more expensive for the griefer) than if a griefer just griefed a town with obsidian. Obsidian mode essentially just allows players to give their structures the strength of obsidian, without the ugliness of obsidian.
Reinforcements remain on a piston if it is retracted or extended. Blocks pushed by pistons also retain their reinforcements (assuming pistons are allowed to move reinforced blocks).
For a piston reinforcement to function properly, PISTON_EXTENSION as well as PISTON_BASE, and/or PISTON_STICKY_BASE must be defined in the Reinforceable Blocks List.
Servers
This is a list of servers currently running the plugin. If you wish to add yours here, PM me.
Source
https://github.com/Indiv0/Block-Saver
Download
http://dev.bukkit.org/server-mods/blocksaver/files
Changelog
Version | Changes | Compatible Builds |
1.15.4 | Fix piston bug | 1.6.4 |
Minimize jar size | ||
1.15.3 | Fix improperly fixed creeper and farmland bugs from 1.15.2 | 1.6.4 |
1.6.2 | ||
1.15.2 | Complete code restructuring and re-organization | 1.6.4 |
Serialization system optimized (BREAKS BACKWARDS COMPATIBILITY) | 1.6.2 | |
Optimized storage. Serialized data now takes up <10% of previous space | ||
Fix creeper explosions destroying reinforced blocks | ||
Fix reinforced farmland being trampleable | ||
Implement autoenforce, reinforce commands and permissions | ||
Simplify Prism and WorldEdit bridges | ||
Completely remove non-RVC based reinforcement | ||
1.14.2 | Implement support for loading materials from configuration by ID | 1.6.2 |
Fix multi-world support | ||
Fix feedback not turning off | ||
1.14.1 | Fix configuration errors | 1.6.2 |
Fix code formatting | ||
Fix dependency errors | ||
Change block break values to match that of obsidian | ||
Fix certain permissions checks | ||
Implement gradul block damage feedback | ||
Fix explosion handling | ||
Re-implement serialization system | ||
Add multi-world support | ||
Fix fireworks visual effect | ||
1.11.2 | Fix last RV on block not being registered | 1.5.2 R-1.0 |
Fix sand falling despite configuration not allowing it | ||
Fix possible NullPointerExceptions | ||
Implement more thorough player permissions | ||
Fix improper feedback on the final block break | ||
Correct event priorities | ||
Implement support for auditory feedback | ||
Clean-up/re-organize config.yml | ||
Fix plugin crash if logging is enabled but Prism is not found | ||
1.11.1 | Fix grace period not being handled correctly | 1.5.2 R-1.0 |
1.11.0 | Initial release | 1.5.2 R-1.0 |
Bugs/TODO
All bugs and TODO information can be found on the issue tracker for this project on GitHub.
@Indivisible0
I guess im missing something obvious? After players reinforce a block they cant remove the reinforcement without breaking it however many times the reinforcement calls for.
Reinforcement mode is when you place a block it automatically adds the reinforcement without needing to individually hit each block. Something like '/bsmode iron on' will take iron out of your inventory every time you place something. Would just be helpful for players who like to build bigger things.
@Nistune1
What do you mean by "build in reinforcement mode"? And users are able to remove their own reinforcements.
I really like the look of your plugin, the problem with citadel is that the commands are great, the different options are great, but there are no permissions. Despite really loving the per-world permissions and visual feedback the problem players are having (and I have) with block saver is that it doesn't have a way to automatically build in 'reinforcement' mode and that they cant remove their own reinforcements.