[SEC] ChunkAutoClaimer v1.6 [1.2.5-R1.3]

Discussion in 'Inactive/Unsupported Plugins' started by sebastiannielsen, May 6, 2012.

  1. BUKKITDEV: ChunkAutoClaimer

    This is my first server mod. This plugin is extremely newbie-friendly. Basically, its a completely automatic block antigrief plugin, which automatically claims chunks (16x16) people build on, without the player need to do ANYTHING to protect the area. Also, if the area cannot be protected for a reason, for example if player have used up all his allotted chunks, or are not adjacent to his other's chunks, the player will be notifyed on placement of block. Contains a friendslist, and the plugin can also be localized to the server's local language, thanks to configurable messages.
    The plugin also automatically ignores common blocks which does not belong to players creations, so not people claim whole caves due to putting up torches and such.

    Sorry if this are a pain to read, the forum throws some newlines in the dustbin, nothing I can do anything to, its easier to read @ BukkitDev

    This is my first server mod.
    WORLEDIT compatibility fixed in v1.1
    NOTE TO ALL WHO UPGRADE FROM VERSION V1.2 TO V1.3:
    DELETE YOUR ChunkAutoClaimer FOLDER IN /plugins PRIOR TO UPDATING!
    VERY IMPORTANT!
    Config format was changed between V1.2 and V1.3 making configs incompatible between them!

    What does the plugin do?
    Basically, this is a complete Anti-Grief plugin, that combats all in-game block-based grief. With block-based grief, I mean that the plugin will
    not prevent other forms of grief like PvP griefs, chat grief/spamming and such. Theres other plugins for that.
    This plugins works of a concept called "craftable blocks". With craftable blocks, I count all blocks that must be crafted to be able to obtain.
    I excepted Torch from this list, because Torch is a block that you spread around you without actually building anything useful, for example as lighting
    in caves. I also allow "expensive" non-craftable blocks to be counted - for example ore and such, because these blocks is also blocks players wont spread around with.
    The reason of excepting non-craftable cheap blocks (for example sand, cobblestone, raw tree logs) is because often, people get out of stuck spaces by bulding a high pile of a cheap material that is noncraftable. And of course, the players does not want to claim all caves they get out from in a emergency.
    The list of ignored (non-counted) blocks can be configured, just add the block IDs you want to ignore in config.

    How does it work?
    So now to the point. By building atleast 7 (configurable, 7 is the default) blocks, the player claims the area. Nobody else can build here except for when players add them to friends list. If the player want to remove/unclaim the area, the player simply removes(breaks) 7 (this is also configurable, 7 is default) blocks.
    By this system, the antigrief is completely automatic. Player does not need to know there is protection, they just build and build and build. Like vanilla minecraft experience but without griefing. And when they flat the house with the ground to move to a new place, the plot is automatically unclaimed and everyone can build there.
    To prevent griefing by claiming unneccessary land, theres 2 configuration options that is useful:
    maxclaims: Maximum claims a player can own. Can be overriden by /set command.
    requiretouch: (true/false) - Require that claims a specific player own touch each other.

    To prevent griefing in the wilderness, there is much configuration options that is useful:
    allowfirespread: (true/false): Allow fire to spread and/or burn outside claims. Allow igniting/placing of fire block 51 outside of claims.
    Fire will never spread or burn inside claims regardless of owner/authorization. Igniting/placing fire inside claim is always allowed provided you have authorization to the claim - eg can build there.
    allowugfirespread - Same as firespread but applies below the belowground value.
    allowlava/allowwater - allows unbucketing of water/lava in the wilderness.
    allowuglava/allowugwater - same as above but applies underground.
    allowtnt - Specifies if explosions does have any effect above ground.
    allowugtnt - same as above but applies underground.
    belowground - integer for ground level. Below this are considered underground, above this are considered overground.

    To prevent spamming the friendslist so config.yml gets huuge, theres one configuration option that is good to go:
    maxfriends: Maximum number of friends a player may have on friendslist.

    Is the default un/claimblocks=7 in config file good to do? Should I change it?
    You should change it. Most servers have different styles. The values are optimized for a survival server, so if you run a creative, its recommended to change the values to very high values, like up to 10-16. Do never exceed 16, then players will never claim land since chunks are 16 blocks wide and most players build singe-block thick walls. Exceeding 16 would require players to build double-block thick walls.
    If you run a creative server, I also recommend to change the ignoreblocks list in config, to include more blocks. You are also free to experiment with the values. Sometimes it can be good with a higher unclaimblocks than claimblocks, for example claimblocks=4 and unclaimblocks=5. You just need to find a good config that fits your server best, based on other plugins aswell. Also the maxclaims should be changed if your building style on server is that players build huuuuge castles. Also consider changing the maxfriends option if your server have a large number of different players. The default 7/7/9/5 config does fit most servers.

    Why aren't chest and/or doors protected?
    Its because I encourage creative building. Block protection is all you need. For a very simple (ugly) chest protection, you simply put a block above the chest. Since the block cannot be destroyed, the chest cannot be opened either.
    But what I encourage is creative protections like advanced redstone circuits, codelocks, hidden doors, underwater entrys and such.


    Why are this plugin better than compared to <pluginname>?
    * LogBlock, BigBrother, HawkEye:
    These plugins are more aimed to detecting grief after it has been done, for the purpose of kicking/banning the griefer then. My plugin aims of
    (in combination of other plugins) to make a server completely automatic and adminless. With my plugin and some other plugins, you should be able to put /kick and /ban into the dustbin!
    * PreciousStones, Residence, GriefPrevention, MyChunk:
    Those require players to manually protect the area. Many newbies don't understand how to protect, or forgets to protect, despite of the plugin educating the players. Before I did this plugin, I ran GriefPrevention on my server. It was a huge disaster, since none player did extend their claims.
    When Griefers come along to the server, they griefed the houses so they looked very funny with non-griefed floors floating in the air, with a chest in the middle. That was because GriefPrevention's initial claim.
    What I needed was something FULLY automatic, where players do not need to think about the protection. That was why I created this.

    Which other plugins do you recommend?
    • NoCheatPlus - just set everything to "cancel" in config to get anticheat protection without kicks and bans.
    • nolagg - Prevents griefers from DDoSing the server by dropping 9999999 items in the same place.
    • orebfuscator - Prevent Xrayers.
    • spamguard - Great antispam plugin to prevent people from spamming the chat. Remember to set warnstokick and kickstoban to 2000000000 in config to prevent the plugin from kicking/banning someone.
    If you install all these plugins including my plugin, you have a completely self-adminning server without any kick/bans.

    Why are chunk-based protection, better than arbitary protection?
    Now lets get this straight. Chunk-based protection, like this plugin and MyChunk, is based on minecraft "chunks", which are 16x16 in size and extend from bedrock to sky.
    Arbirtary protection, is when you are free to select the plot size for yourself, like Grief prevention and Residence.
    Advantages of Chunk protection:
    • Smaller data sizes. A chunk is identified by 2 coordinates. Arbitary plots must store 4 coordinates (start & end), leaving double sized datafiles behind. If you also store bottom and top to enable stacking of claims, its 6 coordinates. Talk about 3 times as large files! Also, block coordinates are larger in size than chunk coordinates, since theres 1/16 less chunk coordinates for a given world than block coordinates. So basically, block coordinates are also 256 times larger, making data files huuuuuge.
    • Code does not need to check for overlapping of claims. Either a chunk is claimed, or a chunk is unclaimed. Theres nothing between. In arbitary plots, there is a possible that half the claim is owned by someone else, so the plugin must check everything, which increases processing time.
    • Theres no waste of land. With arbitary protection, you can end up in a situation when a large plot of land has so many tenants so theres just small walkways of 2-3 block wide unprotected land between the houses, which are useless.
    • Theres always some "breathing freeroom" around the chunks, since players will not build exactly where a chunk is. A normal newbie player would propably claim a 2x2 area of a total of 32x32 blocks from bedrock to sky, and build a house in the middle, leaving say 4 blocks on all sides. Arbitary protection can leave houses nearly touching everyone, making it ugly.
    What about newbies and collaborative builders?
    To enable collaborative building, theres a friendslist builtin. You simply /add or /del friends from this list, and friends have full permissions in your claims EXCEPT for unclaiming your claims or trusting others. If you mess up and add a griefer to your friends list that you don't remember the name of, just type /del without any arguments, and your friendslist are completely cleared.
    The friendslist maximum is configurable to prevent a player from making config.yml huge.
    If you as a player completely mess up, for example using up your claims at a area you dont remember the location of, and just mess everything up, you can reset yourself by writing /reset .
    This unclaims ALL your claims and CLEARS your friendlist. You can then easly claim your house again by removing 7 blocks from your house and placing them again.

    What if you want to remove 7 blocks from your area, but still have the area claimed?
    Easy. Just remove 6 blocks, then add a block, and then remove more blocks again.
    Or break a nonexpensive block each 6th block.

    How I do "adminclaims" like in GriefPrevention?
    Just /set the claims to some nonexistent name. You can do this both on unprotected land and protected land. Counters and lists will be updated accordingly automatically. For example: /set SOMETHING. Note that /set overrides maxclaims, so no worry "running out of adminclaims".
    Please consider that someone may register and take a name of a adminclaim for the purpose of griefing, so select the "owner" of the adminclaim carefully.
    I would suggest using /set notch for adminclaims, since Notch (the creator of Minecraft) would never go and grief some server, he would not probably visit your server, and since nobody can register notch's name, your adminclaims stay safe.
    If you have LOTS of claims to make adminclaim, like a large city you are gonna build, make sure you are OP, and you don't own any claims. Do /reset for sure. Then you make claims as usual. When you are done, run this:
    /reset YOURNAME notch
    this will (again) reset yourself, and then transfer all your claims to "notch". Since notch never gonna grief your server, your city is now protected, while you still can do whatever you want with your own character and/or claims (eg resetting and such) without affecting the city. But remember, as long as you are OP, you can break/place blocks in adminclaims. However, you will not unclaim any adminclaims.
    If you want to be sure of not touching claims, either /chk the claim you are building in, or use /walktest to find occupied claims.

    Which commands can be used?
    /chk - Checks the plot you are standing on. Useful to check that you really have protection.
    /add <friend> - Adds <friend> to your friendslist
    /del <friend> - Removes <friend> from your friendslist
    /del - Clears your friendslist
    /set - OPONLY - Unclaims the plot you are standing on regardless of owner.
    /set <name> - OPONLY - Claims/changes owner of the plot you are standing on to <name>
    /reset - Resets your profile.
    /reset <name> - OPONLY - reset <name>'s profile. Useful if <name> got very inactive or is no longer playing.
    /walktest - Toggles Walktest mode on, which means you can only build in unprotected areas. Type again to turn off.

    Why are it so many items in the configuration file?
    main/messages/* - strings - Localization system. Allows you to configure the language of plugin.
    main/config/requiretouch - boolean - Require that players claims are adjacent to each other.
    main/config/allowfirespread - boolean - Controls fire spread & igniting outside of claims.
    main/config/allowugfirespread - boolean - Controls fire spread & igniting outside of claims under ground.
    main/config/allowlava - boolean - Controls lava placement outside of claims.
    main/config/allowuglava - boolean - Controls lava placement outside of claims below ground.
    main/config/allowtnt - boolean - Controls explosions.
    main/config/allowugtnt - boolean - Controls explosions under ground.
    main/config/allowwater - boolean - Controls water placement outside of claims.
    main/config/allowugwater - boolean - Controls water placement outside of claims below ground.
    main/config/belowground - integer - Sets the ground level.
    main/config/claimblocks - integer - Number of acceptable blocks that need to be placed to claim a area.
    main/config/unclaimblocks - integer - Number of acceptable blocks that need to be removed to unclaim a area.
    main/config/maxclaims - integer - Number of plots a player max may own - can be overriden by /set.
    main/config/maxfriends - integer - Max number of friends a player may have on friendslist.
    main/config/configversion - integer - Maintains the config for you, incase config are updated. Set to 99999 to bypass the feature.
    main/config/ignoreblocks - integer list - Block IDs that are deemed unacceptable. These blocks do not count toward claimblocks/unclaimblocks.
    main/players/*/blockcounter - Stores the number of consequetive blocks placed in chunk lastclaim by *
    main/players/*/lastclaim - Stores the last chunk the player placed or removed a block in. If this changes, blockcounter are reset.
    main/players/*/gotwarning - Prevent the plugin from spamming people. This are set when players get "unclaimable land" warning, and are reset when player places/removes block in acceptable land.
    main/players/*/walktest - Stores player's current walktest status. It is reset everytime player joins.
    main/players/*/claims - List of claims. Gets all claims owned by *, required for /reset to work.
    main/players/*/friends - Stores the player's friendslist
    main/claims/* - Stores the owner of chunk *.

    Why does CAC ignore OPs? (ONLY in V1.1)
    OP can build/destroy anywhere to be able to do its administrative tasks. If a OP want to only touch unprotected surfaces, he can enable
    walktest by typing /walktest .
    requiretouch, maxclaims and maxfriends does NOT apply to OPs.

    What are /walktest good for? I dont see the point in the command?
    Some examples:
    * Your'e a OP and want to do some duties on unprotected land. You turn on /walktest to be sure to not touch protected land.
    * You have just built a large house and want to be sure its protected in complete. You turn on /walktest and then try breaking random blocks around your house to eventually find any unprotected spots.
    * You want to find some unprotected land, and don't want to wander into lands where you are on the owner's friendslist.
    * You are gonna do some PvP, and dont want to unintentionally break blocks in your buildings.
    * You want to do a real test of a contraption that you built, that might result in you unintentinally breaking blocks, and want to be sure.
    * You have built a large complex and want to explore it "as a griefer".

    Source Code: http://chunkautoclaimer.sebbe.biz/
    PayPal Donate: https://www.paypal.com/cgi-bin/webscr?return=http://dev.bukkit.org/server-mods/chunkautoclaimer/&cn=Add special instructions to the addon author(s)&[email protected]&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted&cancel_return=http://dev.bukkit.org/server-mods/chunkautoclaimer/&lc=US&item_name=ChunkAutoClaimer (from Bukkit.org)&cmd=_donations&rm=1&no_shipping=1&currency_code=USD
    My Minecraft name: sebnie
    TODO:
    * Prevent unclaiming of chunks if the unclaim would cause 2 of the players chunk not to be adjacent anymore - if requiretouch are set to true.
    (I do not have any solution for this, come with ideas for this)

    ToNotDo/WontFix:
    * Per chunk/claim friendslist. This becomes too advanced to end users. I want to keep the plugin simple for end users. Either you trust a user, or you don't trust a user. Theres nothing between. Why would you trust the user to build in AREA A but not in AREA B?
    * subclaims. A too advanced feature too.
    * Permissions. Nope. Wont do it. The /op command exist for a reason, use it.
    * Database. Theres no need for this. Use this plugin on small servers and/or use a SSD if the plugin gets a performance impact.

    Version 1.6 Changelog:
    • Fixed wilderness protection. Lots of new config variables added. Of course, OP does bypass this (except for TNT/firespread protection, since those events are ownerless)
    • allowtnt/allowugtnt - Does explosion have any effects overground or underground?
    • allowlava/allowuglava - allow emptying of lava overground or underground?
    • allowwater/allowugwater - allow emptying of water overground or underground?
    • allowugfirespread - same as allowfirespread but applies underground.
    • belowground - integer - specifies ground level.

    Updated to version 1.2

    Changes:
    • -Improved piston code for performance, by skipping execution if the piston extends upwards or downward or self, since then the piston cannot go into a protected chunk where the player do not have access.
    • -Removed the whole inner class, and instead letted ChunkAutoClaimer implement Listener() (while extending JavaPlugin at the same time), thus resulting in one single .class . This shaved off some kilobytes from the .jar
    • -Changed default 3 claimblocks/unclaimblocks to 7.
    • -Changed "author" in my plugin.yml to match my curse/dev.bukkit account instead of my bukkit forum account.


    1.2 is just waiting for approval.

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

    C0nsole

    Well, is it a placeholder or a real thread? I am guessing real thread as the project is done and you have the downloads available.
     
  3. garrett2smart87 :
    http://forums.bukkit.org/threads/mo...the-plugin-submissions-releases-forums.41022/

    "For the time being, we will continue to handle Plugin Submissions and allow you to use a placeholder submission to ensure your plugins remain indexable, however, BukkitDev project approval handling will be taking priority. In the near future we will be switching http://plugins.bukkit.org over to BukkitDev, then closing off our submissions forum once most people have moved over."

    Version 1.3 releaed:
    *CONFIG FORMAT UPDATED*
    *DELETE YOUR CHUNKAUTOCLAIMER FOLDER PRIOR TO UPDATING*
    • Fixed bug that made you claim areas if you ignited a unflammable surface. Tracked down the bug to minecraft/bukkit code which treats fire placed on inflammable surfaces as placing air (BLOCK-ID=0).
    • SECURITY FIX: Commands now only accept valid minecraft.net names as arguments, 3-16 characters, abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
    • SECURITY FIX: maxfriends config option added, prevents players from stuffing up the config.yml file with crap.
    • Config format updated.
    • Config reading/writing code updated, now it COMPLETELY deletes unclaimed chunks from config, rather than setting claim owner to "nothing", saving lots of disk space.
    • claimscounter is removed from config, this counting is now managed by returning allclaims.size(); instead, further saving some disk space.
     
  4. Offline

    C0nsole

    Oh, I realize that, I just meant that you still put the same information. You dont write
    Just paste all your info like I did for ItemStay.
     
  5. @garrett2smart87 : aha now I understand. I tought he meant that I just should make a thread pointing to BukkitDev just for making sure the plugin appears at plugins.bukkit.org

    But now its fixed.
     
  6. Offline

    C0nsole

    Ok, cool!
     
  7. Now I updated this to Version 1.6, adding Wilderness protection.
    Just waiting for approval.
     
  8. Offline

    ZachBora

    I remember there used to be clientmod to open chests with blocks above them. Don't know if they fixed it in Minecraft or Bukkit.
     
  9. Could anyone verify this issue? If its true and unfixed, I could add a check that checks if its not air above the chest, and thus not open the chest at serverside.
     

Share This Page