[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 potential... will try
  3. Offline


    Will try this on my new server, (we are trying to break the server atm with testing, so this will be a torough test lol).

    Edit: Works fine (but how do I turn it on by default for everyone on the server?)

  4. Offline


    i will try this out in my next server update, will let you know what i have found
  5. Offline


    might be of use to link this with iconomy to stop greifers claiming as much land as possible?
  6. Offline


    Is this like Cuboid? You claim one block and claim the other block and makes a square?
    EDIT: When I say like Cuboid I mean like does it make a Square like Cuboid does when you select two blocks
    I will try this out and tell you how it goes :p Well I tried it but it seems it only protects the blocks your standing on and not a region like I want it too
  7. Offline


    Don't have any use for this ATM, but just wanted to drop in and say that I think this is an excellent idea!
  8. Offline


    I tryed this on bukkit v733, great plugin thats exacly what i need.
    One major flaw, if i restart the server ALL REGIONS ARE LOST. :'(
  9. Offline


    Any errors? Are the Regions.txt and FriendsList.txt files getting written in plugins/ARG? Also, you might want to update to 740, that's the build i test with.

    I have no plans to integrate iconomy. However, if someone wants to fork, I don't have a problem with that.

    There will be a command(something like /arg removeplayer [playername]) for mods to remove all regions claimed by that player should they come across that kind of griefer or you can remove that player manually by /arg save, modify the Regions.txt, /arg load. I've yet to see how big of a problem this will be. Griefers usually get their kicks by destroying existing structures. I don't imagine it would be too fun to go to all the trouble necessary.

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


    Can claims expire over time? It would be nice to have claims that are made by players that have not logged in over a defined period of time removed automatically.
  11. Offline


    I have an error where the names of the regions save to the in-game playernames, but then after a relog, it switches to the console names, complete with prefix and suffix codes, so MinecraftPlayer's regions suddenly are labled fMinecraftPlayerf, and then he can't access it anymore. I'm using groupmanager, I don't know what else to add that might help. I love this plugin tho, and everyone on my server was really excited to try it out :)
  12. Offline


    This is already in the to-do list. It will be included in 0.3

    I don't test with groupmanager. Not sure where it would get the console name from...I'll have to look into that.
  13. Offline


    I think the prefix is the color, like f for white, 4 for red, but I'm not sure what that's called. Hex? And no idea bout the suffix, although I see the option for it in my groupmanger/groups file, I don't have anything set for any of them, but it shows a ?f on my console/your plugin...

    Thanks for looking into it if you get a chance :3

    edit: I'm using essentials chat to change the colors of names, which probably explains some of it, but I think I saw the suffixes there before I installed essentials chat, at least for ops.
  14. Offline


    Updated to 0.2.1

    Fixed incompatibility with EssentialsChat (Thanks iggiiggi)
  15. Offline


    I'm still getting regions belonging to 9PlayerNamef on server restarts with the new version
  16. Offline


    Any chance of this plugin be ported to a decent storage (sqlite/mysql) ?

    I have a 300+ server, with that huge number of players, flatfiles would kill my server performance.
  17. Offline


    I'm unable to replicate any further problems using EssentialsChat. Are you sure those are new entries from the new version or are they left over from before? Do you use any other chat/name changing plugins?

    SQLite is a possibility, however I don't run MySQL on my minecraft servers and therefore won't be adding that functionality.
  18. Offline


    This is how I have essentials chat configured:

    Administrators: '&4 <{DISPLAYNAME}>&4 {MESSAGE}'
    Moderators: '&c <{DISPLAYNAME}>&c {MESSAGE}'
    Wands: '&2 <{DISPLAYNAME}>&2 {MESSAGE}'
    Trustees: '&9 <{DISPLAYNAME}>&9 {MESSAGE}'
    Everyone: '&f <{DISPLAYNAME}>&f {MESSAGE}'

    so that's how the regions are being saved, like it's not reading the color code but just printing it or something

    I don't use any other chat plugins, and I deleted the configuration file completely. I run mcmyadmin, that's what I was referring to as the "console", but I have no idea if that's involved. If it helps I can post my plugin list or anything else you might need, I've never done any bug reporting before.
  19. Offline


    I tryed the plugin again and its working on CB 733 and 740.

    How can i let people claim land with /arg claim instead of /arg toggle ?
    I tryed to add it into permissions for the default group but it didnt work.
  20. Offline

    Dylan Tweedy

    Is there a way of having /arg toggle on by default? :)
  21. Offline


    Can you check if it still has the color codes in Regions.txt if you don't use EssentialsChat? If it does then its probably another plugin causing this.

    Currently /arg claim is tied to the arg.bypass permission because it bypasses the requirement of building to claim. It will be changed to arg.claim in 0.3.

    I plan on having a list of options that can be configured in 0.4. This will be one of them.
  22. Offline


    hmmmm. it gives them a chunk? How do you tell where a chunk is?
  23. Offline


    It's just like a 4 quadrant graph, except instead of x and y it's x and z. To figure out what chunk you're in divide your x and z axis by 16 (each chunk is 16x16) and drop the remainder then subtract one on any negative axis (otherwise 0,0 would be 32x32).

    Or you can just use the info tool (String by default).
  24. Offline


    so say here is two chunks (separated by |)
    what if some1 builds their house like this (o's being their block placement)
  25. Offline


    They can claim both as long as they place 16 consecutive blocks in each. Typically players will do this naturally, but they can always use the info tool to make sure and still won't need to bother a mod or know any commands (except maybe /arg toggle to turn autoclaim on).
  26. Offline

    Clever Trevor

    A great idea would be to limit the amount of chunks a player could "own", but allow for other chunks to be built on. Additionally, a sort of menu system to delete chunks a player does not want would be awesome.
  27. Offline


    Its will be very good to get Claimed chunks , with Nik of owner and chunks he have..
    And to save Chunks like Nikname#,Example: Lenivets: Leni1,Leni2
    Were Leni1 - is a chunk , and Ops can TP to that chunck to delete it..

    If its all hard then just limit number of chunks for 1 owner..

    Sorry but i cant get , how to set zone.. i added screen how i chosed.. but i cant understant how its works :confused:

    Can you draw instruction ?)

    Attached Files:

    • wrf.jpg
      File size:
      248 KB
    Last edited by a moderator: May 16, 2016
  28. Offline


    Hey Friesnadrink, great plugin! I installed it and gave the users arg.user and arg.claim under permissions but when they try to do a /arg claim the error message is that they don't have sufficient priveleges AND if they lay down 16 blocks they do not get the "claimed" message (/arg info shows no owner). Do I have to explicitly spell out certain permissions like arg.user.claim or just arg.user? Sorry, new to this whole programming thing :confused: Btw, using CB 740.
  29. Offline


    Can we get a definable region that cannot be claimed? My users have an annoying tendency to try to claim all the land right around the spawn, and I'd prefer to force their lazy asses to spread out a little.
    Imm0rt41 likes this.
  30. Offline


    I think this has been said before but is there any way to limit the number of chunks that players have? Like make a default of say 10 chunks but then allow Admin/Moderators to give them more. It would also be awsome if you gave it iconomy support so that they can purchase more chunks for a price to limit players rate of expansion. Thanks.

Share This Page