Block Limiter
BlockLimiter
What is BlockLimiter?
Block limiter is a plugin designed to add permissions to block placing, or block breaking. This will allow you to have greater control over what people can build, and what they cannot.
Features
• Block players from using specific blocks, as defined in permissions.
Commands
Currently there is only one command at the moment.
/blockID
This command will print out the alphanumeric ID for the item in your hand. (It just makes it easier to find the IDs for the permissions)
Permission nodes
As of 1.0.1, you can use alphanumeric IDs in the permissions. I won't list all of the permissions, because there are about 300... As you can see, it would probably be pointless to do that. Anyway, here are the permissions you will need to know.
There are type types of permissions, one will manage block placing, the other block breaking.
• BlockLimiter.place.*
• BlockLimiter.break.*
This permission will allow you to place restricted blocks.
• BlockLimiter.place.bypass
This permission will allow you to break restricted blocks.
• BlockLimiter.break.bypass
This permission will deny a player to place any block.
• BlockLimiter.place.deny.all
This permission will deny a player to break any block.
• BlockLimiter.break.deny.all
You can block a player from placing a block by using the permission below. (replace <ID> with the numerical ID, or alphanumeric ID for the minecraft item)
• BlockLimiter.place.deny.<ID>
You can block a player from breaking a block by using the permission below. (replace <ID> with the numerical ID, or alphanumeric ID for the minecraft item)
• BlockLimiter.break.deny.<ID>
Due to signs having 2 different id codes when placed, I made another permission for signs. You can still block the individual types, but using the permission below will block signs altogether for the player.
• BlockLimiter.place.deny.sign
• BlockLimiter.break.deny.sign
Coming soon
• Alphanumerical permissions. (completed in 1.0.1)
• Language File
Suggestions
Please comment suggestions, and I will see if I can do it. :)
Donations
If you would like to be awesome enough to support my developing, donations would be amazing. :)
How do I actually configure this plugin? Where do I put the permissions and what is the required format? Suppose I wanted to disable the breaking of any block other than wool, how would I do that?
@tierdal
Interesting idea, I will look into it.
With that said, it would be a bit difficult to prevent glitches. If the server was shut down, or the plugin unloaded, it would cancel the events, and the blocks would not regenerate.
To prevent that, you could save the events in a .db file, but that file could end up being massive due to having to log every block broken...
Another way you could deal with it, is to set it to respawn all blocks on disable.
suggestion: add a block respawn timers so you can have worlds where you can only break one type of block and they will respawn after set time
@Relicum
Hi Relicum, yes, I am new to bukkit coding... Although I am quite aware of the ID codes being removed. The plugin uses the string names for the blocks/items, but the permissions use ID codes. So as far as I can tell, there shouldn't be an issue when the ID codes are removed.
I don't really know what the modifyworld syntax is like, as I haven't had a look at it before, but I wrote this 100% from scratch, without hijacking other dev's code.
No, I have not load tested it yet. I am a bit concerned that it may have a high load due to the high amount of "if" and "else if" statements in the block listener class. I will load test it shortly, and see what I can do to improve the performance.
Thanks for leaving the comment, it's good to have feedback. :)
Am presuming your new to bukkit coding or you would know that item id's are being completely removed from the game. All items/blocks will be reference with string value. So within max of a month your entire plugin won't work.so id work fast to switch ASAP. This also looks to be an all most identical to modifyworlds syntax, hopefully you have coded it yourself. If you have well done it an easy plugin to code due the the number of events handled , have you load tested it ???