[SEC/ADMN/MECH] Road Protector v0.1.3 - Simple plugin to protect areas [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by fromgate, Dec 21, 2011.

  1. Offline

    fromgate

    Road Protector
    version: v0.1.3

    Download
    BukkitDev

    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


    Additional video

    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 sandstine slabs to build roads you must define blocks 13,43:1,44:1 as a "speed blocks" (use command /rp speedblock 13,43:1,44:1). 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
    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 (open)

    /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


    Latest changes:
    v.0.1.3
    • Snowblower: Now you can protect your roads from the snow-forming! (Don't forget to define pavement blocks for your road)
    v.0.1.2
    • Now you can skip data values in blocklists. For example you can use "44", but not "44:0,44:1,44:2...."
    • Now you can use material names in blocklists. For example: "GRAVEL,SLAB:44"
    Previous changes (open)

    v.0.1.1
    • Now speedway, exclusion-blocks (blocks allowed to place and break) supporting data values. For example if you going to create speedways using sandstone step you can define speedblocks: "44:1,43:1"
    • Now you can disable "[RP]" prefix in warning message
    v0.1.0
    • New feature! Walk-mode! You can protect area while walking :)
    • New feature! You can remove protection in area using a command /rp unpr [radius] (radius can be skipped, to remove all protectors affected to single block)
    • Code optimization, simple API created.
    v0.0.9/3
    • Now allowed protect areas deeper than y=5 level (only for all protector block-types except bedrock)
    v0.0.1
    • Releasing of my awesome plugin
    v0.0.2
    • One bug fixed
    • Recoded according to new bukkit's event system
    v0.0.3
    • Fixed bug (all blocks with Y=127 were protected)
    • Ability to play effect (smoke, flames, ender perls, sound effect) instead of "protector installed" message.
    • Now you can setup the protected area warning message
    • new commands: /rp effect, /rp efftype, /rp cfg, /rp reload
    • RB-1.1-5 Ready
    v0.0.4
    • In addition to build-protection, now you can protect chest, doors, buttons, etc... New command: /rp swlist.
    • You can edit warning message. New commands: /rp prtmsg, /rp prtswmsg
    • New command /rp cfg to display current configuration
    • And still RB-1.1-5 Ready ;-)
    v0.0.5
    • Added explosion protection.
    • New command /rp explosion to toggle explosion protection mode
    • Plugin name changed (space removed) - you need to rename "Road Protector" folder to "RoadProtector"
    v0.0.6
    • New commands /rp explace and /rp exbreak to set block list, that allows players to place or break defined blocks in protected areas.
    • Some code optimization
    v0.0.6/2
    • Fixing some bugs (thanks to MidasValo for reporting)
    v0.0.7
    • Protection from lava-flows added (New command: /rp lava)
    • Protection from water-flows added (New command: /rp water)
    • Translation support added
    • Metrics added
    • Version update check added
    v0.0.8
    • Warning messages are colored again
    • If you clicking with wand on a rail block (rail, detector rail, power rail) protector will be placed under two blocks deep (instead of one)
    v0.0.8/2
    • Bug fix: /rp wand command sometimes does... nothing :(
    v.0.0.9

    • Speed ways! You can run faster at the roads, if you enable speedway feature, choose speed, and define the pavement blocks. New commands: /rp speedway, /rp speedblock <id1,id2,...,idN> and /rp speed <speed potion level>. Player requires permission roadprotector.speedway to running fast on the roads.
    v0.0.9/2
    • Fixed issue with slab speedway pavment. Now you can fast-sprinting if you on the slabs too.


    Like this plugin?

    [​IMG]
     
  2. Offline

    Ondechoc

    very good idea !
     
  3. Offline

    YoshiGenius

    Will the settings you choose ingame be kept after restart or reload? If so, I may get it, but it is impractical on a server that has scheduled restarts such as my own...
     
  4. Offline

    fromgate

    Which settings? In config file saving: radius, depth, height, protector-block, rp-wand, and crmode. Which settings was forgotten?
     
  5. Offline

    fromgate

    v 0.0.2
    • One bug fixed
    • Recoded according to new bukkit's event system
     
  6. Offline

    WetterSiegen

    Hello

    You can also anweden the Protection of rail routes where
    wood underneath it and on it seemed to be everything he has so protectet
    Material?
     
  7. Offline

    fromgate

    Road Protector will protect every block that being inside area defined around the protector-block. You in build above that area, and dig under it.
    But you give me a nice idea: I'm going to include to the next version the protected block list: so you can protect only material, that you use to build roads.
     
  8. Offline

    fromgate

    v 0.0.3 released. Changes:
    • Fixed bug with (block with Y 127 were protected)
    • Ability to play effect (smoke, flames, ender perls, sound effect) instead of "protector installed" message.
    • Now you can setup the protected area warning message
    • new commands: /rp effect, /rp efftype, /rp cfg, /rp reload
    • RB-1.1-5 Ready
     
  9. Offline

    fromgate

    v 0.0.4 released.
    • In addition to build-protection, now you can protect chest, doors, buttons, etc... New command: /rp swlist.
    • You can edit warning message. New commands: /rp prtmsg, /rp prtswmsg
    • New command /rp cfg to display current configuration
    • And still RB-1.1-5 Ready ;-)
     
  10. Offline

    md_5

    1.1-R7 please, great post btw
     
  11. Offline

    fromgate

    It really works with latest devbuild (installed on my test server), so I think there will be no problem with R7.
     
  12. Offline

    md_5

    Title changed for you, approved
     
  13. Offline

    chopstick121

    it wont let me protect the road whats happening?
     
  14. Offline

    fromgate

    chopstick121

    Please tell me craftbukkit version. And how you trying to check road is protected? Did you disable edit mode? And creative? Any error message in chat? Or in server log?
     
  15. Offline

    chopstick121

    fromgate

    i fix it today the problem was i'm on creative
     
  16. Offline

    ShutupSanta

    can my users still place things and chests on protected blocks and still access the chest

    please answer if u know

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  17. Offline

    fromgate

    Yes. If you need to allow player to use chest (breaking) you need to exclude chest id (54) from the "swlist".
    Command - /rp swlist<list>
    Default list: 54,61,62,64,69,77,96,84,107,23. If list is empty only build/break protection will be active.

    Or you can edit entry: protected-switch-list: 54,61,62,64,69,77,96,84,107,23 in config.yml
     
  18. Offline

    ShutupSanta

    thx for ur help
     
  19. Offline

    fromgate

    Polish RoadProtector tutorial. Thank you very much Treekt :)
    Video created by Treekt
     
  20. Offline

    wumboworld

    Everything works perfect as far as the message and stuff, but when edit mode is off, and i go into survival, i can still delete stuff. my switch list is empty, is that it? and what does it do? plz help
     
  21. Offline

    fromgate

    Empty switch list will only allow to use any items like levers, chest, etc. And it not allow to any build or break actions.
    Are you sure that edit mode was off? You may check the protected area size (radius, height, depth)...
    I'll check the code again, but we use RP at our server and it works fine.
     
  22. Offline

    ElementalSpider

    Does it work with towny (people making towns on the road)?
     
  23. Offline

    wumboworld

    i have the w,h,d set to: w = 1500 d = 15 h = 256

    yes i am sure edit mode is off.
     
  24. Offline

    fromgate

    ElementalSpider
    We use Towny and RoadProtector.
    But you must know, that RoadProtector did not check any permissions and no one including server operator (if they did not switch to edit or creative mode) will not be able to build and construct at area protected by RoadProtector.

    At our server in the towns road protected by Towny, but other roads (in wilderness) protected by RoadProtector.
    In some towns we use RoadProtector to easy protect some places (shops or hotels), to prevent stole items by every players including residents of towns where protected area located.

    wumboworld
    Oh.... I think it's was great crash test for RoadProtector. You will not set such a huge values for w, h, d variables. If you do it RP will scan every block in defined area. You server was not crashed only because RP starts scan from lowest y-coordinate.
    I think I must include maximum value check in future release.

    You need to set w, d, h to smaller values. For example, if you set values: w=2, h=4, d=2. It will protect cuboid with dimensions 5x5x7:

    View attachment 9307

    If you need to protect a road, you must setup "protectors"all over that road.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  25. Offline

    wumboworld

    ok TY!! :)

    works like a charm! TY SOOO MUCH!
    btw what would u say is the highest i CAN set the hight

    i have some buildings not too tall that i would like to protect from the road.. would 20 or 30 work?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  26. Offline

    fromgate

    Hmm.. When I'm need to protect a building I'm using some protectors on every floor of building. But sometimes it's really hard to hide bedrock inside the building.
    You can set the height to 20 (I've test only with 10). I think it will work fine.
     
  27. Offline

    wumboworld

    awesome thx u soo much! :D
     
  28. Offline

    maxa2g

    Works well thank you!
     
  29. Offline

    fromgate

    Changes in v0.0.5

    • Added explosion protection.
    • New command /rp explosion to toggle explosion protection mode.
    • Plugin name changed (space removed) - you need to rename "Road Protector" folder to "RoadProtector".
     
  30. Offline

    Rtbrman12

    How do u protect everything but not doors/chests? where is that option?
     

Share This Page