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.
Such a useful plugin for saving your stuff against griefers(monsters & players alike), can't wait for more future updates. Great work! :-)
Is there a way to configure the plugin so no item is required to reinforce blocks?
@Xickle
This used to be a feature, but was removed to support rollbacks and logging, and also because my needs for this plugin changed, and I didn't want to support the additional functionality.
I'd like to ask you to implement an option for more different reinforcement blocks, with different protection strengths! Sort of like Citadel has, but with configured reinforcement strengths for each block kind.
@Indivisible0
Ah, ok.
I have to assume it was the the permissions plugin I was using, Privileges. I switched from that to group manager for another reason, and blocksaver began working. There may have been other things I changed, but I wasn't really keeping a record at the time, unfortunately.
Thank you for your help and for your work on the plugin!
@TheDedOne
Great! For posterity, what was the problem?
In order to provide support for rollbacks and Prism/LogBlock integration, that feature had to be removed. Sorry about that.
Now blocks simply have the strength you set in the config when you reinforce them. You must break them the specified number of times (by default as long as obsidian), and if you stop breaking them they return to normal.
Ok, I got it working finally! However I see a reference in the config to an option to be able to reinforce a block multiple times, but I don't see the actual option. Is it still available?
@Indivisible0
The world name is the same as the name in the files, and I have given myself and the person helping me the permissions for reinforcing and damaging. I found out today, for some reason, the feedback commands seems to work for me, but tells my friend it is an unknown command. I don't know if that helps at all.
I have also tried generating a fresh config for it, and still the same thing. Registers when I list the plugins, commands seem to work for me but no one else, but no actual reinforcement.
Edit: By the way, the other plugins I have installed are worldguard, worldedit, craftbook, commandbook, mythic mobs, shopkeepers, and privileges. Maybe one of those conflicts?
@TheDedOne
Are you sure the world is named correctly?
Have you given yourself the permission to reinforce blocks (blocksaver.reinforce)?
Is feedback enabled for you (/blocksaver feedback)?
@Indivisible0
I didn't think it was a version issue; just making sure. I'm not getting any errors, and it shows up when I list the plugins in-game and the commands seem to work as far as toggling options. All I've changed are a few falses to trues and vice versa, and changed the item used to reinforce to emerald block. Nothing happens when we try to reinforce, as if there is no plugin. I'm sure it's something I change, but I failed to test it before changing the config.
Here is my config file;
@TheDedOne
Is it throwing any errors?
What is the exact process you are using to reinforce?
Have you modified the config?
I haven't tested it recently personally, but I know for a fact that it works with 1.7, as it is currently running on MinerAp with 1.7.4 I believe. Either way, there is no reason compatibility with 1.7 should be broken (the plugin should function indefinitely, even with updates).
Should this work with 1.7? Or has anyone gotten it working with 1.7? After installing it the game seem to recognize it, but it doesn't actually do anything when we try to reinforce blocks.
Any help would be appreciated!
@AETech
That is very very wierd. Are you sure you're installing it correctly? Someone else installed it just yesterday and told me it worked for them.
@Indivisible0
Yes I have, bukkit doesn't show any errors but simply doesn't recognise it as a plugin.
@AETech
Have you tried running it with 1.7.2-1.7.4? The plugin doesn't depend on NBT so it shouldn't break with updates.
I do plan to release a major feature update (which is why it's taking so long), but there's no reason the lates build shouldn't work with the latest version.
@Indivisible0
Please update it asap. Ive been waiting so long :(
@redundantgaming
I will very soon.
You should totally update to 1.7 :D
@Nistune1
The latest version implements reinforcement mode. Thank you for the suggestion :)
@Nistune1
The reinforcement mode idea seems interesting. I might implement that soon.
As for being able to remove the reinforcement, builders CAN remove their own reinforcements thanks to the "grace period" configuration option, which allows the creator of the reinforcement several seconds to correct a mistake.