Road Protector
Road Protector
Simple and effective plugin designed to protect area from destruction. The main difference from other similar plugins is the lack of saving information about protected area in databases or in file; certain modularity, which allows combine protected areas in any forms, so you can easy protect even a winding road; maintaining the possibility of destroying blocks under the protected territory and building over it.
How to use it?
Just place the "protector" block (default - bedrock) and you will create a create a "force field" of certain size (radius, depth, height are configurable) around that block. When you place other block, you increasing protected are. For convenience provided special wand-mode in which you can easily bury the protector (under 1 block) by right clicking with the wand (default - clay) on the surface of area, that you need to protect. If necessary to build something in protected zone, you can use the edit mode provided by plugin, or switch to creative mode.
Small video tutorial
Speedways
If you created a road and protect it using RoadProtector you can enable fast-sprinting at the roads. Command /rp speedway will toggle the speedway mode. First you must define road pavement blocks: it's a top block of your roads. For example if you using gravel and slabs to build roads you must define blocks 13,43,44 as a "speed blocks" (use command /rp speedblock 13,43,44). Than you need to define sprinting speed at your roads: /rp speed <speed>. Default speed value is set to 0 and it equal to effect of speed-potion level 1. Player with permission roadprotector.speedway now can sprint very fast on the road. Walking speed will not modified, player will walk with normal speed.
How to remove the protection
Since the plugin is designed for server administration, then you can use the creative-mode or any editor for example Voxels Sniper and remove the block tread. In addition, if you define as a "protector" any other block, for example a sponge, this block can be destroyed in the edit mode in the usual way.
Permissions
- roadprotector.edit — allow to use RP-wand and construct at protected area (player must switch to edit mode)
- roadprotector.config — allows to use configuration commands
- roadprotector.speedway — allows to fast-sprint at speedways
- roadprotector.walk — allows to use walk-mode (auto protect areas while walking)
Commands
- /rp help
- /rp edit — enable / disable the edit mode.
- /rp wand — enable / disable the "protector wand"
- /rp walk — enable / disable the "walk mode"
- /rp unpr [radius] — remove all protector-blocks around area defined by radius (if radius is skipped, will remove all protector affected to player location)
- /rp crmode — enable/disable of using creative mode as edit mode
- /rp reload — reload configuration from the config.yml
- /rp cfg — display current configuration
Configuration commands
- /rp w [radius] — set the "radius", which determines the horizontal dimensions of the protective zone.
- /rp h [height] — height of the protected area
- /rp d [depth] — the depth of the protected area
- /rp swlist — set the "switch" blocks to protect (doors, buttons, levers, chests, etc...). Default list: 54,61,62,64,69,77,96,84,107,23. If list is empty only build/break protection will be active.
- /rp explace — set this list of block allowed to place (default: 60,59)
- /rp exbreak — set this list of block allowed to break (default: 59,31)
- /rp prtmsg <message text> — set warning message when building and breaking blocks. If empty, will use default message.
- /rp swmsg <message text> — set warning message when try to click blocks from /rp swlist. If empty, message will not displayed.
- /rp prblock [block id] — set the protector-block (default is 7 - bedrock)
- /rp unprblock [block id] — set the unprotector-block (default is 3 - dirt)
- /rp setwand — change the "protector wand" (default is 337 - clay)
- /rp walkroad — toggle walkroad mode. If enabled walk mode will be activated only at roads (speedways)
- /rp effect — toggle effects/message. If effects on, you will see effect above the installed protector block instead of message in chat
- /rp efftype — set effect type: 0 - smoke, 1 - flames, 2 - ender signal, 3 - sound effect (click)
- /rp explosion — toggle explosion protection mode
- /rp snowblower — toggle snowblower (protection from snowforming)
- /rp speedway — toggle speedway mode
- /rp speed <speed> — define speedway sprinting speed
- /rp speedblock <id1,id2,...,idN> — define pavement block at speedways
- /rp lava — toggle lava-flow protection mode
- /rp water — toggle water-flow protection mode
Changes in v0.1.3
- Snowblower: Now you can protect your roads from the snow-forming! (Don't forget to define pavement blocks for your road)
@RustyDagger Hello, visited your server. It's nice. Find a speed way :)
But you was not online, I'll try to find you there later.
Enabling fly is really weird Its not very uh percise like it used to be normaly you just press space twice and you fly off but now its like press twice and Hold space while it like lags a bit then hope that it turns on fly.
its really strnage and hard to explain. I dont have a creative map so you cant just join and test it. but the ip is mc.craftersuntiltheend.com Hit me up if i'm around and ill show you.
v0.1.2
http://dev.bukkit.org/media/files/637/718/RoadProtector.jar
@RustyDagger Hello, can you test latest version (uploaded moment ago) too? http://dev.bukkit.org/media/files/637/718/RoadProtector.jar
@RustyDagger
Hello, can describe what is weird with creative fly? I have no any strange effects.
Walk mode, by default, require walking on the speed-blocks. You toggle this requirements with command /rp walkroad, but be careful: if you disable "roadwalk" protectors will be placed everywhere you walk, including grass, dirt...
Since installing this plugin activating and deactivating creative fly has been weird please fix it its very annoying. Also walk mode seems to do nothing I turned it on walked and nothing was protected..
if its not that simple you should explain how to use it some where...
This looks nice and simpleMay fix my issue of players greifing my skywalk on my games map i cant for the life of me work out how they manage it they are in adventure mode unless in an arena so :(
v0.1.1/2
http://dev.bukkit.org/media/files/636/634/RoadProtector.jar
@webby68 @TheMasturMinecrafter
You can prevent this error message. Just edit config.yml and put something at line: protected-switch-list: ''
For example: protected-switch-list: '7'
This will prevent clicking the... bedrock and will not take any effect.
I'm going to upload today a version where this bug will be fixed.
@V10lator
Hi, V10lator :) I think you don't need to quote all this text, just ask me :) No problem with sources, all available at github: https://github.com/fromgate/RoadProtector
Source: http://dev.bukkit.org/licenses/7-gnu-general-public-license-version-3-gplv3/
So: Sources please!
Awesome! Getting it! Thanks :)
@webby68 @MidasValo @TheMasturMinecrafter
Hello! New version uploaded:
Changes in v0.1.1
http://dev.bukkit.org/media/files/635/129/RoadProtector.jar
@webby68
Hello, can you show me your config.yml of the RoadProtector?
I am getting this same error as another user below, however, I don't know what file to go into to modify the code to fix the problem. All help would be appreciated.
10:24:41 [SEVERE] Could not pass event PlayerInteractEvent to RoadProtector org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:332) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven t(CraftEventFactory.java:177) at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:1 14) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:546) at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46) at net.minecraft.server.NetworkManager.b(NetworkManager.java:276) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:581) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at fromgate.roadprotector.FGUtilCore.isIdInList(FGUtilCore.java:263) at fromgate.roadprotector.RPListener.onPlayerInteract(RPListener.java:89 ) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:330) ... 16 more
@MidasValo
Thank you MidasValo!
And thank you for suggestion. I will include it to my TODO list :)
Hi fromgate, I think your plugin sure has become very successful :) Great work!!
I have a curiosity. Are you going to add support for items that use the same data value but have different subsets? e.g. Wood blocks 17:0, 17:1, 17:2, saplings, etc.
It would help when protecting jungle wood for cocoa beans or only allowing certain trees to be planted. Would that be a difficult feature to add? Just curious. Thanks.
@TheMasturMinecrafter
That NPE error means that you include something that not equal to integer number in string, where must be included only numbers (block ids, for example) divided by common.
@TheMasturMinecrafter
latest version works fine with 1.3.2/1.3.1
when do you think the new version will be downloadable??