[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

    friesnadrink

    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.

    Features:
    • 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)
    Download:
    Latest Jar
    Source

    Commands:
    Permission node
    Description

    /arg toggle
    arg.user
    Turns on/off(default) autoclaim

    /arg claim
    arg.claim
    Claim the chunk you are standing in

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


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

    /arg friends
    arg.user
    Displays your list of friends

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

    /arg removefriend [playername]

    arg.user
    Removes a friend from your friends list

    /arg save
    arg.saveload
    Saves Regions.txt and FriendsList.txt

    /arg load
    arg.saveload
    Loads Regions.txt and FriendsList.txt

    /god [player]
    arg.god
    Enables/Disables godmode

    Changelog:

    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
      string.
    • 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

    kuk

    oh I don't test creating new player :( .. there is problem with data type in SQL command .. so I repair it today.

    autoclaim working for me if I have record in player table .... try it create manualy and try it if there is another bug with it becouse I saving it into player table.

    permissions:
    Why you want disable configurating their own chunks ? :)
     
    recon88 likes this.
  3. Offline

    recon88

    Would be great if u can fix it today :)

    autoclaim works that's correct but not by default because there isn't the entry in DB for the new players.
    I will keep testing. But at the moment i cant find more Bugs.

    permissions:
    Because they never had commands to handle that :) Would be nice if u can add this. We used our old arg config since we started our server so i think we dont need this for our users now.
     
  4. Offline

    teamvortex

    Hey kuk good job on everything man I tested ARG ALL day and it ran like a champ. Just need to fix that player create problem with SQL and this plugin will be good to go.

    Might I also suggest you start a new plugin page for this seeing as you kind of took over the development.
     
  5. Offline

    kuk

    FIXED
    creation player bug

    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Dec 14, 2016
    recon88 likes this.
  6. Offline

    _Robert

    Hey @kuk , there's a way to migrate from the flat files to the sql? Maybye an script?

    Also, the expire feature works like the original ARG? or works like when a player dosen't show up for X days, all the chunks of that player get unclaimed?

    You should make a new plugin page, like @teamvortex suggested, im sure there's a lot of people looking for something like this.

    Thanks for your time and brain-power!
     
  7. Offline

    recon88

    We are working together now on the plugin..
    Yes there are ways to migrate flat files. I saw a script but cant remeber where. Its a very leightweight one.

    And yes this needs really a new page ;)

    btw: i'm working on the permission nodes at the moment (seperated protections)
     
  8. Offline

    _Robert

    Sooooooooo, ok, i'll try to search it. Anyway, how it works the expire feature?
     
  9. Offline

    recon88

    nearly done ;) just cleaning up a lil bit
     
  10. Offline

    kuk

    you can send me your regin file and I send you sql file . Tool for this I release later becouse I don't have server where I can host it.

    And expiration delete only player yet. becouse it's executed on mysql side. I working on smart relations between tables while deleting players.
    and deleting players with this condition

    (unix_timestamp(last_logged)+expire_time*86400)<unix_timestamp(NOW()) and expire_time != -1

    so if you need someboty to newer expire set his expire_time to -1 :)
     
  11. Offline

    teamvortex

    Quick FYI on the permissions for the new ARG.

    If you set people with the permission arg.claim AND arg.user it gives them the ability to unclaim OTHER peoples chunks. So whatever you do, DO NOT give regular players arg.claim or arg.unclaim ONLY give regular players arg.user
     
  12. Offline

    recon88


    it will be all seperated in new version so don't worry ;) I fixed this problem already
     
  13. Offline

    teamvortex

    Ok its more then what I thought at first.
    The only way people can claim is if you give them arg.claim, HOWEVER if you give players arg.claim they THEN have the ability to unclaim everyones chunk.

    Also new players that connect to the server do NOT have permissions to claim at all even if I do set it to arg.claim I DID update to the fix for player creation and I DID check the database to see if the player is being created in the database and they are they are just not getting the permissions to claim.

    You said you fixed this recon88 how so and can I get a copy of that cause as it is now ARG is making more problems on my server then its helping.
     
  14. Offline

    recon88

    The problem with new players is fixed too ;) But i am not about to release it today because there are some little bugs. Sorry for that
     
  15. Offline

    kuk

    With arg.user can users claim chunk. arg.claim and arg.give is used for admin who can manage ownership.
    Is there problem to claim chunk only with user node ?
     
  16. Offline

    teamvortex

    NEW users to the server can not claim chunks with /arg claim it WILL however autoclaim. Even though I look in the database it shows that the player was added.

    Also ARG breaks EVERY night. Every time I come back on the server ALL chunks are unclaimed and I have to type /reload to have them show up again. So every night when I leave my server everything gets griefed. Not sure why its losing connection to the database but it is and its EXTREMELY frustrating. I cant run a protection tool that randomly stops working.

    One thing I just noticed about the database problems. When I or any other admin is in the server and types /reload claims work for the WHOLE time the admin is on the server. The minute the admin that types /reload leaves ALL claimed chunks are no longer claimed.

    WTF????

    I know you said the new version of ARG has some bugs but can you please post the newest build I cant run ARG in my server if claims keep vanishing.

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

    recon88

    we are checking your errors
     
  18. Offline

    teamvortex

    Just some quick information dont know if this changes anything or not just giving any information I can:

    I DID NOT reset the database when updating to the newest version, not sure if that effects anything IF it does then I for sure cant use ARG cause I cant be reseting my database everytime an update comes out.

    Secondly the current released version of ARG was working fine on the older dev version of bukkit once I updated to the release version 1185 thats when things went wrong.
     
  19. Offline

    recon88

    The version in this thread is compiled for cb1060

    edit: and we cannot reproduce ur error
     
  20. Offline

    teamvortex

    1060 is for MC 1.7 when will you be working on 1185 for MC 1.8 which IS Current Build as of yesterday?
     
  21. Offline

    recon88

    He is working with 1060... I am working with 1185.. so
    if i should release it u have to wait :/
     
  22. Offline

    teamvortex

    And by if you mean when right ;)

    PLEASE I could really use an updated version for 1185...

    Ok so there have been a lot of people testing the ARG issues on our server and we think we got an idea of whats going on.

    Seems like when a player is not near a claimed area for some time it turns back to unclaimed the odd thing is it still says its claimed in the database and when someone does reclaim it, it adds the chunk to the total chunk amount they have.

    So someone can claim walk away for a while it unclaims then reclaim that same chunk and in the database it will say they own that chunk twice and it counts towards their total chunk amount.

    You say you guys can reproduce my issue but im telling you something is majorly screwy with ARG and if something is not fix with it soon this mod will die cause people are going to start switching.

    I am already looking up other protection tools.

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

    recon88

    Ok, i was offline for 2 hours and nobody was on my server.. Now i joined and tried to claim some of my and others chunks...
    nothing happened

    so the error has to be in kuk's 1060 version..
     
  24. Offline

    teamvortex

    Yeah I agree thats why I am asking when a 1185 can be done?
     
  25. Offline

    kuk

    so this is new and last 1060 update
    download : <Edit by Moderator: Redacted mediafire url>


    added paiting protection
    repared time expiration
    total new plugin actions related to permission nodes with configuration
    removed database level administrating .... only permissions and OP can be used.

    see new config file format
    action:node

    example
    cmd_give:user

    mean command /arg give can be used only if player have permission arg.user

    plaese don't delete any line from this file just change node names

    all action with _other is for admins and mean usage on chunks owned by other player
    all action with _free mean not owned chunks so you can disable some actions globaly for examle not registred players :)

    I can't reproduce your problem so I hope new update will work for you. If not I can made version for you with reloading only arg plugin on reconnecting interval ... so loading arg is fast this don't produce large CPU load

    ARG for #1185
    <Edit by Moderator: Redacted mediafire url>

    deleted some problematic classes

    If this will work withhout problems in next version I planned protection against Endermans

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

    teamvortex

    THANK YOU so much... :)
     
  27. Offline

    kuk

    give me some info after test ;)
     
  28. Offline

    recon88

    u dont like to read ur pms?
     
  29. Offline

    teamvortex

    Ok soo, claims are STILL vanishing.

    I left the server for a while to watch a movie and a friend got me on vent about 2 hours after I left and said all claims are gone and when he tries to claim anything it would tell him he already had the max claims of 0, lol

    So I pop into the server type /reload and everything is back to normal.

    I know its not an issue with the database its self seeing as I run other databases off the same SQL with no problems.

    Do you think it could have anything to do with the fact that I used older versions of ARG and when I updated to your newer versions I didnt wipe the database?
     
  30. Offline

    kuk

    DB clearing only if there are some inconsistence data. so can you send me your server with config and plugins to test ? and data dump from DB
     
  31. Offline

    _Robert

    If it's a script you can use a free hosting service like dropbox. Here are my files!, thanks :).

    http://dl.dropbox.com/u/40068360/ARG.rar
     

Share This Page