[Inactive] [SEC] AutoRegionGuard v0.5 - 'Players' protect regions simply by building [860]

Discussion in 'Inactive/Unsupported Plugins' started by friesnadrink, May 1, 2011.

  1. Offline


    AutoRegionGuard- 'Players' protect regions simply by building
    Version: 0.5

    This is my first go at java and I welcome any input other developers might have on my plugin. I hope you guys like it!

    AutoRegionGuard is different from traditional protection plugins because players don't need to use any commands to gain its benefits. Players can 'claim' a chunk (16x16 square of blocks sky to bedrock) just by placing 16 blocks within that chunk. This protects their structures and chests from grievers/other players that they have not added to their 'friends list'. One of the hopes I have of this plugin is that mods will need to do less intervening and can instead focus on other things. Also includes /god.

    • Claimed regions are protected from other players placing/breaking blocks/lava/water
    • Unauthorized players cannot open chests in claimed regions
    • Automatically claim a chunk by placing 16+ blocks in it
    • Prevents creeper explosions if they would affect a claimed region
    • Godmode
    • Ops/Mods bypass protection
    • Right-click with 'String' (now configurable) to get chunk info
    • Right-click with 'Feather' (now configurable) to unclaim a chunk (arg.bypass allows unclaiming of others' chunks)
    Latest Jar

    Permission node

    /arg toggle
    Turns on/off(default) autoclaim

    /arg claim
    Claim the chunk you are standing in

    /arg info [<world> <xvalue> <zvalue>]
    Get info about the chunk you are standing in or specified

    /arg unclaim [<world> <xvalue> <zvalue>]
    Unclaim the chunk you are standing in or specified

    /arg friends
    Displays your list of friends

    /arg addfriend [playername]
    Adds a friend to your friends list

    /arg removefriend [playername]

    Removes a friend from your friends list

    /arg save
    Saves Regions.txt and FriendsList.txt

    /arg load
    Loads Regions.txt and FriendsList.txt

    /god [player]
    Enables/Disables godmode


    Version 0.5
    • fixed an ArrayIndexOutOfBoundsException when adding/removing friends
    • flint and steel can no longer be used to claim
    • fixed /arg toggle problem that involved typing the command twice to truly toggle
    • added explosionprotection(true/false) as an option in arg.properties
    • added protectchests(true/false) as an option in arg.properties
    • added /arg give <playername> [<world> <chunkx> <chunkz>]. Must have arg.player(and arg.bypass if you dont own it). Gives <playername> the specified chunk.

    Version 0.4
    • added fire protection for claimed chunks(fire won't spread or destroy blocks in claims)
    • /arg [removeplayer, save, load, checklastonline] can all be used from the console
    • added properties file to change many different settings such as autoclaim being on/off by default
    • added a maximum for owned chunks (configurable setting, bypassed by arg.bypass)
    • fixed /arg claim permission issue
    • added /arg unclaim [<world> <xvalue> <zvalue>] for long distance unclaiming
    • added /arg info [<world> <xvalue> <zvalue>] for long distance info
    Version 0.3
    • /arg removeplayer [playername]. Must have arg.bypass. Removes all claims [playername] has.
    • scheduled saves (every 30min)
    • ARG now creates LastOnline.txt. Format [playername];yyyy/MM/dd/HH
    • expire regions for inactive players
    • /arg checklastonline. Must have arg.saveload. Manually executes code to expire players.
    • Changed permission node for /arg claim to arg.claim
    Version 0.2.1
    • Fixed incompatibility with EssentialsChat (Thanks iggiiggi)
    Version 0.2
    • Added chunk info tool. Must have arg.user. To use right click a block while holding
    • Added /arg info. Must have arg.user.
    • Added unclaim tool. Must have arg.user (and arg.bypass if you dont own it).To use right click a block while holding feather.
    • Added /arg unclaim. Must have arg.user (and arg.bypass if you dont own it).
    • Added /arg friends. Displays your list of friends. Must have arg.user.
    • Fixed a error when using /god on other players
    • Added /arg toggle. Must have arg.user. Turns on/off(default) autoclaim.
    Version 0.1
    • Releasing my awesome plugin
    Big thanks to @Sammy and @Samkio for their awesome tutorials and posts.
    marti.2001 and GreyBishop like this.
  2. Offline


    Have somebody tested it?
  3. Offline


    god mode does what?


    work in 1060?

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


    I think, i have a problem with ARG ... since I installed the plugin, I could not mine any block in the world. By disable the plugin the problem fixes. I don't know where the problem be located.

    ARG.properties :
    As PermissionsSystem I use Permissions3 and my user have '*' permission to the world and also to all worlds ('*'). Other functions of ARG works fine for me ((un)claim, toogle, god, ...)

    Need help please.
  5. Offline


    This plugin has been abandoned by the developer so I doubt you'll get any help. This plugin will slowly stop working with each new RB unless someone forks it.
  6. Offline


  7. Offline


    Is there a way to set things up so that one group can own say 4 chunks and another can own 9 for example?
  8. Offline


    It's printinting message with owner when you try to mine ? and blocking all player or only noOP ?

    Can you write me IP of your server to see what is doing ? or send your server files with maps, plugins and config.

    What's your problem ? don't work or waiting for some functions ?

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


    figured it would naturaly not work since its so out dated. wait it will still work even if its not currnt?
  10. Offline


    I recompile it with 1060 but the old version also works. Try it :)
  11. Offline


    ok ty i will see how it works
  12. Offline


    Would you ever consider it only claiming say 4 below and to the sky? Or set up so it can be done in the config file
  13. Offline


    on that note would you be willing to make a limitaion to the amount of chunks 1 person can own based on friends or some other method that would allow people to earn more chunks while preventing players from mass claiming areas? while still allowing ppl to expand on what they have.

    possibly allow an option to limit the amount of chunks they can have that are not near their original area.
  14. Offline


    this plugin really needs some support (obviously after 1.8 :p ) it's an excellent concept and very well made, but if someone forks or updates this, PLEASE add an option to disable the godmode command! it's overriding WorldGuard's godmode, and the worldguard one works properly.

    keep up the good work!
  15. Offline


    can't you just negate the godmode permission? -arg.god
  16. Offline


    Will someone take this plugin over?
  17. Offline


    Yes please, someone fork it?
    I just found a problem with it too.. :p
    Seems no matter how long i set it to keep regions, it still deletes them.
    Anyways, back on topic....
    Do you think you could do it @kuk ? You updated it once... :)
    We'd all be forever grateful... :D
    I wonder... If not, ArmEagle might... If he's still up for it. He fixed one plugin for me some time ago, and he's keeping it updated... (TradeCraft). I'm pretty sure anyways.
    It's been so long, i can't remember if that was the one or not. Haha.
  18. Offline


    I made update of this plugin.

    Now it's running only on MySQL database (saving into files is not possible).

    New commands:
    For users:
    /arg message Toogle chunk changing messages.
    /arg fire [1/0] Enable/disable fire protection for actual chunk.
    /arg explode [1/0] Enable/disable explode protection for actual chunk.
    /arg store [1/0] Enable/disable store protection for actual chunk.
    /arg door [1/0] Enable/disable door protection for actual chunk.
    /arg pitstone [1/0] Enable/disable pitstone protection for actual chunk.
    /arg redstone [1/0] Enable/disable redstone protection for actual chunk.
    /arg access [1,6,7] Setting access level for actual chunk.
    For administrator:
    /arg maxchunks [player] [max] Set player maxchunk.
    /arg level [player] [level] Set player admin level.

    Removed commands:
    /arg save
    /arg load

    New functionality:
    Compiled with #1060.
    All players data saved in database (possible make web administration).
    All chunks have own configuration.
    Added pitstone protection.
    Added redstone protection (lever,button,pressure plate).
    Added door protection (door, trap door).
    Extended store protection(chest, dispenser,furnace).
    Own administrators levels ( OP administrating can be disabled in config).
    Messages when walking betweenchunks with different owner (Can produce heavy data transfer to database).
    Normal users can now use /arg claim command.

    Removed functionality:
    God mode removed.
    Time expiration (will be added later).
    Removed permission plugin functionality(becouse there is implemented own system).
    Removed info tool and unclaim tool.

    Planned functionality:
    Make 5 different friends list for access to different chunks.
    Remake time expiration functionality.

    <Edit by Moderator: Redacted mediafire url>

    More info:

    Setting access for chunk:
    1-5 values ...for future 5 friends list . Now only 1 can be used.
    6 .... public Everybody can do everithing but you are owner.
    7 .... private Only for you. nobody from friendlist can access there (only admin can :) )

    Admin levels:
    1- Normal user
    2- Can give, unclaim others chunks.
    3- Can building on others chunks.
    4- (2+3)
    5- Can change config of others chunks.
    6- (2+5)
    7- (3+5)
    8- (2+3+5)
    10- Global admin


    There are 2 files.
    claimthreshold - setting count blocks needet to autoclaim
    new ignoreop If plugin ignoring OP status.


    MySQL connection data. Need to change to your own!!

    Plugin tested only on localhost without other player.
    Please post there all bugs.
    Last edited by a moderator: Dec 14, 2016
  19. Offline


    Ah, crap... I hate to say this, but this has rendered the plugin completely useless for me... I'm not able to accomodate a MySQL server... :(
    The system i'm using right now can't support it...
  20. Offline



    And what functions you need to add to old version ? But saving into files is not safe while server/plugin crash and data can be deleted.

    You can try to find external MySQL server but network speed and traffic is limited.
  21. Offline


    Why are you doing this kuk? :/
    Can you change back some things? Would be nice.

    -Auto Claim as default ! Dont wanna use "/arg toggle" always
    -Set up max_chunks in config ?! 5 is a lil bit to low and i dont wanna change it for all users
    -No more God? Sad but ok
    -Time to expire !! Come on..missing too in config
    -Info tool !!!
    -Unclaim Tool !! Need it
    -Change the permissions functionality back to original ! It was awesome :/

    At the moment ARG is totally useless for me
  22. Offline


    It actually didnt need anything changed, just some of the regions just occasionally disappeared, no matter what the time to remove was set to...

    maybe remove the expire time... i can deal with old ones manually, no biggy xD
    cant be good when it deletes regions of its own accord though. :p

    Thanks @kuk for reviving this though... it's become vital for the (my) server's survival, of sorts. haha.
    de-complicates a lot of protection problems. :D
  23. Offline


    New SQLdatabase ARG works great man. I LOVE this plugin cause it allows users of the server to claim chunks for them selves with out the need of an admin doing everything.

    I got a couple questions for you though regarding permissions and defaults.

    For "user" commands does each user have to change the value for their own chunk. Like for example with /arg access 7 would that make ALL chunks on the server access level 7 or only the user that types it. Also what are the defaults for "user" commands set to?

    Lastly what are the permission nodes I give players IF the "user" commands are set for user chunks only cause as of now most users dont have access to the "user" commands except for claim unclaim and info seeing as I gave them that with arg.claim ext... Would they just be the command like arg.access?

    Thank you for your time and what I would say is the best bukkit protection tool out there.


    You can get SQL database hosting from a site like godaddy for only 12 bucks a month.

    Dont try to find SQL hosting as they will charge way more then they should, find a host for web hosting that ALSO offers free SQL database as part of their plan.

    You can park your domain at godaddy as well for free and set up free easy DNS for your server as well for only 12 bucks a month.

    Then you can have a server name like mc.yourdomain.com and the host can handle all your SQL database needs. Also on the plus side you will now also have a website where you can host some phpBB forums, downloads and stuff of that nature with unlimited bandwidth and support.

    I have hosted around for a long time and IMO godaddy is the best bang for your buck. For only a few bucks a month you can get ANYTHING you need to run a good server.

    P.S I am talking SQL database, domain, php and website hosting you still have to find a good minecraft host as well to handle the server. For that I would suggest xenonservers. I hate their support but they have the best pricing plan out there for minecraft servers AND they give you full ability to customize anything you need. Just dont expect much help from them on anything.

    If you need any help setting DNS, SQLdatabases up through a webhost im more then happy to help anyone that needs it.

    Drop me a line at [email protected]

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


    Commands for chunk config are used only for chunk where you standing if you are owner or admin with config level
    When you claim chunk all config flags are set to 1 (protecting) ... but in next version I add default values for new chunk into config file.

    In this version is permissions disabled but in new I restore their functionality ( I hope :) )

    If player doesn't have access to use command see into database what level they have ... for normal user use 1 .

    I hope I answer all your questions because my english is bad.
  25. Offline


    SQL may be faster or more reliable but the plain flat files system was just fine, a simple auto save-interval would offer some protection against crashes and failures

    or SQl/flatfile shud possibly be optional
  26. Offline


    So I found a bug with the new ARG. Every few hours or so ALL claims just vanish and all permissions that did exist for users are no longer there even though they are still in the permissions. HOWEVER, if an admin on the server types /reload it then puts all the claims back to where they were and permissions for regular users work again.

    The claimed chunks can be built on during the times when permissions and ARG claims vanish but during that time they can not claim chunks cause the permissions for claim are not working either even if toggle is set to 1.

    All other permissions and plugins work fine during this time so I can only assume its ARG having the conflict and not something with bukkit.

    If you could look into this it would be great cause as of now ARG is just not something that I can use if claims are just going to vanish every few hours and we need an admin to type /reload
  27. Offline


    I don't test it for hours .... I thin plugin lost connection to database ... can you see into log if there is some errors ?
  28. Offline


    Yeah I looked at the error log but I didnt see anything. Also permissions for ARG get lost at the same time the claims do and permissions for ARG are server side not databased so I dont think its a database connection issue.

    Ok got a bit more information for you here. First just to make sure its not other things I tried a different dev version of bukkit as well as used bukkitpermmissions rather then permissions 3 and have the same issue. I was how able to pin point it down to an event which causes the problem. Seems chunks reset and arg permissions stop working for everyone BUT OP when a user (new or old no matter the rank) joins or leaves the server.

    Every time that happens though as long as an admin types /reload claims and permissions come back.

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


    I see some errors and I hope I fix it ...... now testing it 10 hours running server OK

    New update :)

    <Edit by Moderator: Redacted mediafire url>

    Reenabled support of permission plugin (I hope)
    Added more configs in file
    Added 5 different friends list /arg addfriend <playername> [group] and giving access to chunk for group /arg access <group,6(public),7(private)>
    Added text representation to /arg access for public and private .... /arg access private
    Reenabled infotool and unclaim tool
    When you disable autoclaim it's keep disabled after you loggof and loaded when you login. Value in config file represent only default value for new players.
    Reenabled time expiration.
    Implemented cache to reduce data transfer to database ... configurable cache clearing ... if you use external tool to manage chunks set cache clear interval around 10 seconds .... It's only for loading data into plugin, saving directly to DB.

    How works config file ?
    There are some default values whitch are used when creating player/chunk in DB. When you claim chunk and in config is doors protection disabled your chink will have it disabled too, but you can change this by /arg door 1

    Changing config file don't change existing chunks/players.

    If you want make change for all chunk /players you must use some DB manager and write own SQL command (need some basic SQL skill)

    arg.admin or arg.bypass : global admin
    arg.build : can build everywhere
    arg.give or arg.claim : can giving claiming unclaiming
    arg.config : can configuring players chunks
    arg.user : normal user

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Dec 14, 2016
  30. Offline


    Thx that u did all what i want :) This is just awesome now. That's ARG how i like it. Keep it up ! ;)

    Does not work for me. Still cant claim untill i use /arg toggle. No errors or something like this.Using CB1185

    EDIT 2:
    OK i found the error:
    I checked the DB and there is nothing in "player" after joining the server. Tried to claim a chunk and still nothing in "player". Just "chunk" is filled.

    With no permissions and no OP i can't claim chunk (Totally of 0 reached). It seems that it doenst generate the player Sheets in the DB.

    Tested on Debian:
    (MySQL Server Version: 5.0.51a-24+lenny5)

    Tested on Windows:
    • Server: localhost via TCP/IP
    • Server Version: 5.5.16


    EDIT 3:
    Which permission nodes are working now? The old ones?
    Maybe u can add some new?
    arg.protection (allow to change fire, redstone, store, explosion and piston protection)
    THIS would be awesome if normal users cant use this commands by default. So that they HAVE to use my config parameters and can't change it.
  31. Offline


    Yeah autoclaimdefault is not working I still have to type /arg toggle everytime to get it to work.

    As for recon88s problem my DB is fine, not sure if its a new problem since todays update but its not one im having.

Share This Page