BlockProtection Reloaded
BlockProtection
This is a continuation of the BlockProtection plugin by Kanlaki101. A block protection plugin based off of OwnBlocks by cvenomz. BlockProtection will save any block you place down, to prevent other players from breaking it. Only the player who placed the block, anyone on his friends list, or an admin can break the block.
Developers, have suggestions, or would like to help? I welcome any and all help. Join me in IRC, or PM me!
Dependencies
Vault: Vault is required for BlockProtection to work on your server. Vault is used as an API so that BlockProtection can hook into almost every permissions system.
You can get Vault Link.
WorldEdit is Soft Dependencie. Needed for selected region block protection transfer.
You can get WorldEdit Link.
Features:
Block Protection
Every block your players place will be protected in the database.
Block Exclude List
Prevent certain blocks from being protected.
Admin Bypass
Your admins can bypass BlockProtection and break any player's blocks.
Friends System
Allow your players to build with friends! They can add/remove them as needed.
Where do I begin?
Installation:
- Make sure you have Vault installed.
- Drop BlockProtection.jar into your /plugins folder.
- On first load, config.yml, friendslist.yml, and the Database.db will be created.
- Open config.yml and edit it to your liking, then use the /bpreload command.
Permissions:
- bp.admin (Defaults to op) Allows players bypass BlockProtection, add blocks manually, and get the utility tool
- bp.friend (Defaults to true) Allows access to all of the Friends List features
- bp.reload (Defaults to op) Allows admins to reload all settings from the configuration file
- bp.user (Defaults to true) Allow players to use BlockProtection, and view the owner of blocks
- bp.giveblock (Defaults to op) Allows to give block (by Tool (stick by default))
- bp.transfer (Defaults to op) Allows to transfer blocks from WorldEdit selected region
Commands
- /bp [on/off] Toggle BlockProtection on/off, adding on/off is optional.
- /bpadd [playername] Add a player to your friends list
- /bpadmin Toggle BlockProtection bypass on/off
- /bpclear Clears your entire friends list
- /bplist List all players from your friends list
- /bpreload (Will not reload changes to "save-interval". Restart required!) Reloads settings from config.yml
- /bpremove [playername] Remove a player from friends list
- /bptool Gives the player 1 of the "utility tool"
- /bpgive [playername] All blocks will be given to Name player, by using Tool. To disable write /bpgive.
- /bptransfer [playername] After region selected by World edit. This command will transfer protection of selected blocks to [playername]. When no arguments are given the protection of the selected blocks will be removed. You need bp.transfer or bp.admin to do this.
- /bpimport [world] Import's blocks from WatchBlock MySQL. Check config for MySQL connection settings. If there are many blocks in the database please wait.
Suggestions/Help:
Very important: If you want something added or fixed, reply to questions I will ask!
To submit a ticket for help or a suggestion, click the ticket tab on the top of the page. Create a new ticket, and add the appropriate label.
This plugin is awesome just what I was looking for and works with 1.8+ but 1 problem when tnt blows up a block the block is still owned by the player. Can you make it so when a block blows up it wont be owned by anyone.
In reply to _ForgeUser9327036:
Hello, i updated this plugin to 1.19 and have new features!! witch one of them is any explosions doen't affect the blocks owned
link: https://www.spigotmc.org/resources/blockprotection.105358/
Please update this Plugin to Minecraft 1.8.3. Its so cool.
In reply to _ForgeUser19583693:
Hello, i updated this plugin and added new features :)
link: https://www.spigotmc.org/resources/blockprotection.105358/
Hey is there a way to make it to where players can blow up placed blocks, but not mine them? Help!
In reply to _ForgeUser19450121:
Hello, i updated this plugin and added new features :) and u can enable tnt explosion
link: https://www.spigotmc.org/resources/blockprotection.105358/
my server players changed there names and cant break there blocks how to fix
@follet2004
Not even all of it, the github link is one of the first things on this page...
@bartdaniels
Here: https://github.com/blackwolf12333/BlockProtection
Next Time Read All The Page.
Can we get the source for this pkugin?
@RubeX95
Use "WatchBlock Refired" (http://dev.bukkit.org/bukkit-plugins/watchblock-refired/). This plugin is dead.
I have some great ideas for this plugin :) Add a MySQL databse, chest and furnice protection, AdminStick (destroy every single block)
I like that this plugin is simple, and takes little configuration and is fairly effective. It does seem to work fine with 1.7.4.
However, it is worthless at handling large databases. There is no way to purge old data. There is no SQL support. Either (ideally both) of these would help alleviate this problem, though purging data is really just a band-aid fix, when something like this NEEDS some SQL support.
My main world's database is 127MB. Saving the database takes more than a solid minute, and it ties up the main thread. It will often kick everybody during a save. Startup and shutdown times are again in the range of one minute (instead of the seconds it should take).
Unfortunately now I am stuck with either dealing with the terrible handling of the database, or dump everything (leaving all of our placed blocks newly unprotected) for a similar plugin with SQL support.
If you run a server and plan to have more than 10 regular players, pass up on this one for something more effective.
@MattyQ
Well, you would be right if I were indeed saving on the main thread. But I am not. It is really weird because in my other plugin that also uses asynchronous saving there are no problems at all.
It's good to see that your sollution works though :)
@blackwolf12333
I'm not a programmer, so I'm probably talking totally out my butt, but I wonder if it's not something with the way the scheduler calls for a save. The fact that it's booting people off, and returning a TIMEOUT error, reads to me like it's demanding so much from the main thread the server can't support players at the same time.
DJWeownthis:
I got around this by scheduling the database to save once a day. There haven't been any notable issues with blocks not being protected, so I'm sticking with it.
The size of the flatfiles is directly related; my guess is your lite databases are larger than 10-15mb or so.
@DJWeownthis
The latest download should just work with 1.6.4 R2, I really don't know why the saving kicks everybody of your server. It shouldn't happen :/
Could you update to 1.6.4 R2.0?
everytime the "expect some lagg" comes it kicks everyone off the server.
@spideysri2802
No, this plugin is designed to save only the blocks a play places, so you wouldn't need that unless you are some greedy creep who wants to keep his precious gold :P
@Coookiii
I don't think so :/
@blackwolf12333
Well, isn't there a way that you could code it somehow different...?