InvincibleFences - Make your fences indestructible: Version: v0.1 This plugin prevent users to destroy fences, and protect fences against fire. Features: Prevent users to destroy/burn fences. Permission node to let only op and people you want to destroy fences. Permission node: Download link: Ver 0.1 Source Code: https://github.com/Nicogeta/InvincibleFences And in the jar TO-DO Make fences unsensitive against TNT explosions; Changelog: Version 0.1 Release
... ? I really don't understand your point of view.. there are other request, other things to do, i took on my free time to do that (even if it's a small plugin), i even said that i was on it, and you're doing it... i don't call that "competition".
You took forever to release it. So I started working on it. I finished mine before you posted you finished, I thought up fixes around the time you posted, then I posted my thread before you had even posted it. (Even though you were finished LONG before me)
Forever ?! Are you an ephemeral thing ? I had some things to do but it was done... To do plugins is not a competition, to think like that is the best way to waste your time and/or time of other people.
Just because i said I'm competition doesn't mean I'm going to compete with you. We released two plugins, based on the same reqest, around the same time. That's all there is to it. I was just jokingly saying "competition." Whether your mod gets used, or mine, I do not care. There's a "variety" now, what happens after that matters not.
Code: public void onBlockPhysics(BlockPhysicsEvent event) { if(event.getBlock().getType() == Material.FENCE) { event.setCancelled(true); } } public void onBlockDispense(BlockDispenseEvent event) { if(event.getBlock().getType() == Material.FENCE) { event.setCancelled(true); } } ? why ?
ooo... disable pistons moving fences. i didn't think of that. Dispensers though, that's unnecessary, i believe.
Ah right, Pistons. Totaly forgot about them! So the PhysicsEvent is explained. But Dispense really isnt needed. Also this plugin really could need some if(!event.isCancelled()) in every onEvent. Really guys if you're doing plugins that CANCEL an event add isCancelled to save some CPU if the event got cancelled anyway.
most my plugins i like to override other settings (or they are run first, and isCancelled is a useless code)
Yeah if you're on priority.Lowest the event.isCancelled() can be overlooked but this plugin has priority.High so not using if(!event.isCancelled()) is fail.
If you're op or if you have the permission node (if you're admin, you automatically have it, you have to remove the node) it's normal. Only "normal players" are not able to destroy fences.