Development of 0gb_us as a single plugin will no longer continue. If anyone is still interested in this, it is still being developed as part of 0gb.us_game, the game used at 0gb.us:30000.
Topic: http://forum.minetest.net/viewtopic.php?id=3808
Github: https://github.com/0gb-us/0gb.us_game/t ... gb.us_game
Note: In the game directory, it is not called 0gb_us, but landclaim_0gb_us
[mod] Land Claim [0.7.1] [0gb_us]
Code license: GNU LGPL version 2
Image license: CC Attribution-ShareAlike 3.0
Plugin dependencies: none (bucket, default, and fire are supported, however)
With version 0.2 and beyond, worlds that used the first two versions of this plugin cannot have the plugin just upgraded, as the code that makes them work runs in a radically different way. If you upgrade, all currently protected areas will loose their protection. Not a good idea.
The recipe for a single Land Claim block is:
Cobblestone, Cobblestone, Cobblestone
Cobblestone, Mese, Cobblestone
Cobblestone, Cobblestone, Cobblestone
If you want to own a lot of land, you will need to do a lot of digging. Once you find a decent mese mine though, your set.
To provide a cost to land ownership , as well as provide an easy way to allow users to stake their claims, land claim blocks may be crafted. Once placed on the map, they immediately disappear, but the placer now owns that map chunk (assuming it isn't claimed already). If the land has already been claimed (even by the block's placer) they will not be able to place the block, so they won't loose it for nothing. Once you have staked your claim, you will be the only player able to dig blocks, place blocks, and use buckets within that area, unless you share the area with others. Only the owner can add or remove more users to the list of users able to edit the area.
Map chunks were chosen, instead of protection ranges, to avoid having to look up the meta data of 11^3 nodes every time a block is placed or removed, and avoid having to check each protected area for collisions during protect block placement, and again when any block is dug or placed. Instead, a small amount of arithmetic is applied to the coordinates of the node, and the map chunk is immediately identified. This does have the disadvantage that protected ranges are harder to see, but hopefully the /landowner chat command will help with that.
Commands: (All require the interact privilege)
/landowner: Tells the player who's map chunk they are standing in. This can be helpful for making sure the edges of your constructions are within your property lines, or finding out who built that cool tower across the way.
/unclaim: If used in an area you actually own, you loose ownership of the map chunk, and your land claim block is returned to you.
/sharearea <name>: Adds <name> to the list of players who can edit the current map chunk, after checking to see if <name> is a valid player. This command only works if you own the map chunk. I'm not sure whether it is a bug or an optimization, but Minetest does not consider users who are not logged in to be valid users. So you can only add someone to the share list if they are currently online. I'll try to find a better way of implementing this, where invalid names are not accepted, but uses don't have to be logged in to be added.
/unsharearea <name>: Stops sharing the current map chunk with <name>, if you own the map chunk. Unlike /sharearea, this command accepts invalid arguments without flinching, and can remove someone from a share list even if they are not logged in.
/mayedit: Asked for by people on my server, this command lists all the users who may edit the current map chunk. Due to the way it is implemented, the first name listed will always be the owner. I may remove the /landowner command in the future, as this command makes it redundant.
/showarea: Puts a visual box around a map chunk, so you can see where the protection boundaries are. The box disappears in 16 seconds, and cannot be placed in an area you cannot edit.
Support for other plugins:
bucket:
If bucket is installed, buckets (full or empty) will not be usable in protected areas that you don't have permission to edit.
doors:
Prevents wooden and steel doors from being placed in protected areas, even though they are craft items before they are placed, not nodes. Also provides an API for protecting against other doors defined using PilzAdam'a doors definition API.
default:
If default is installed, sign text will be protected, if the sign is in a protected area. More importantly, default provides the ingredients for the Land Claim block's crafting recipe. If default is not installed, you will need to define a crafting recipe in another plugin, or use /give and /giveme to obtain them. Please note that Land Claim blocks DO NOT show up in the creative inventory unless default is installed. In addition,
fire:
Flammable objects within a claimed area will not catch fire. This was made possible by changes made in the fire plugin by PilzAdam recently, and is not compatible with 0.4.3's fire plugin. While this plugin will function without any fire plugin at all, it will stop the server from starting if the 0.4.3 version of fire is installed, without using one of several workarounds.
Download: http://0gb.us/minetest/download.php?plugin=0gb_us-0.7.1 (version 0.7.1)
Old downloads:
http://0gb.us/minetest/download.php?plugin=0gb_us-0.7 (version 0.7.0)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.6 (version 0.6)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.5 (version 0.5)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.4 (version 0.4)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.3 (version 0.3)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.2 (version 0.2)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.1 (version 0.1)
http://0gb.us/minetest/download.php?plugin=0gb_us-0.0 (version 0.0)
Change log:
- Version 0.0: Original version. Based heavily on Glomie's protector plugin, borrowing much of its code. However, this plugin protects against bucket-based attacks, and does not depend on the moreores plugin.
- Version 0.1: Due to abuse, I had to release this as a bug fix, before I could finish implementing my new idea. This version doesn't actually “fix a bug”, per se, but adds a failsafe, shutting off the protection field around blocks that have lost their meta data (due to influence from other plugins). In addition, the generic “area protected” message was replaced with a more specific message, telling you exactly who owns the area.
- Version 0.2: This should have been released as version 0.1, but that didn't happen. Land claim blocks now act nothing like Glomie's, and leave no visible trace on the map. In addition, I fixed two bugs in the modified bucket, one that I introduced, and one that is present in the default bucket.
- Version 0.3: Owned areas are now shareable, fire protection added, and all dependencies have been removed. Sign text is also protected.
- Version 0.4: Altered the code to restore compatibility with farming_plus, as well as split the code into multiple files to ease debugging. Most non-standard bucket definitions should work now.
- Version 0.5: Fixed a bug where doors can be placed in protected areas.
- Version 0.6: Fixed a bug introduced in version 0.5, which prevented doors from being placed in any claimed area, including your own. Also fixed an error introduced in version 0.4, which causes the server to crash if a player attempt to attack another player with a full bucket. This bug did not effect empty buckets.
- Version 0.7: Added /showarea, an API for defining custom land claims, and experimental support for the new crystal mese system. Said support will be stabilized when crystal mese itself has been stabilized. If you try to unclaim an area, but there is no room in your inventory to replace the claim item, the area will no longer be unclaimed anyway.
- Version 0.7.1: Zeg9 fixed the entity generated by /showarea. Now, it can be seen from the INSIDE, as well as the outside. Thank you Zeg9!
TO DO:
- Contemplate ways to defend against people planting trees under your house. Trees no longer eat blocks when they grow (my very favorite new feature in Minetest 0.4.4), but attackers can still put leaves on your floor this way. Admittedly, this is a minimal threat, but I've always been paranoid.
- Find other vulnerabilities to fix
- Add support for more plugins, in a separate extended support pack
- Celebrate out victory over the vandals