[INACTIVE][SEC/ECON] iCoLand v2.46 - buy/protect land with iConomy [740]

Discussion in 'Inactive/Unsupported Plugins' started by Magik, Mar 25, 2011.

  1. Offline

    Magik

    iCoLand v2.46
    Download/Source Links
    GitHub Source
    iColand v2.46 Jar
    older versions

    Wiki Links
    Wiki Home
    Installation Instructions
    Commands
    Addons
    Permissions
    Changelog

    Plugin Requirements
    • iCoLand v2.46 was tested against Craftbukkit build #740
    • iConomy 5.0
    • Permissions 2.7.2
    Intro
    So I wanted a plugin on my server that allows for self-service protection. But I didn't want to make these areas infinitely creatable, and I hate the idea of admins/mods having to zone out areas for people. So that's where the birth of this idea came from. This mod allows for self-service protection areas, and they are limited by the fact that they must "buy" these areas with iConomy currency. This will greatly reduce the amount of griefing issues I will have to deal with on my server as I will start telling people that this is the only valid form of protection and griefing is a fact of life that is unavoidable if you don't protect your land.

    iCoLand allows you to buy/sell areas of land ( cuboids ) for self-service protection. You select areas of land using the "/icl select" tool, then you can buy the land with "/icl buy land". This makes the land protected so no others can place or destroy blocks in there. There will be addons you can buy that will add extra features to the land you've bought. Such as announcing the zone name when you enter or leave it, having a location heal a player over time, blocking people from entering the zone completely.

    The basic premise of the plugin is that each block in the world is worth some default value (configurable). In the future, there will be the ability to make areas of land worth more. Probably a center point that is highest price modification, with a radius of effect that drops down to 0 at the edge of the circle. Addons also are a per-block pricing scheme.

    Updates and more to come, keep posted.

    Much thanks goes to Nijikokun for the great iConomy, as well as some helper functions I may have stole of his through HaloInverse's DynamicMarket plugin. Thanks to you too Halo! And thanks to TheYeti for maintaining Permissions until Bukkit solves that can of worms. As well as the Bukkti devs for making all of this possible. Also to TomyLobo for his OfflinePlayer class ( to access Permission nodes of offline players ).
     
  2. Offline

    Ash88

    Thinking about land selection when permission forbid you from digging/building to the depth/height you want:

    WorldEdit has a selection tool with lots of options, but the only one needed here would be an "expand up" and "expand down" option. Maybe there is code in their src that could be used?

    /icl select expand 4 up --- expands your selection cube by 4 squares upwards.
    /icl select expand 10 down --- expands your selection cube by 10 squares down.
    /icl select contract 2 up --- reduces the height of your selection cube by 2.
    /icl select contract 5 down -- reduces the depth of your selection cube by 5.

    Borrowing further from World Edit (for those of you not familiar with it) you could add some awesome functionality:

    /icl select expand 2 north --- expands your selection cube by 2 squares north.
    /icl select outset 1 --- expands your selection cube range by 1 in all directions (n,e,s,w,u,d)
    /icl select shift 1 down --- moves your selection cube down by one square.
    /icl select inset 1 --- contracts your selection square by 1 in all directions.

    The benefit would hopefully be that WorldEdit already has this code so it may be useful. The problem with just default selecting "floor to ceiling" cubes is that you are going to be paying for a lot of airspace.... and space you just wont use. Buying air at 50c/block is pricey ;)

    Cheers.
     
  3. Offline

    Magik

    I like those ideas a lot, I'll try to implement those soon. And it shouldn't be too hard for me to implement, but I can't grab worldedit's code to do it, but it's all good, like I said, easy enough
    the only time you should see the /icl help pages is when you type either of:
    /icl
    /icl help
    /icl help <topic>

    or if you incorrectly use a command, sometimes it will show you the /icl help <topic> for that command

    short of that, I'm not sure what's wrong... if you don't have the permission node, it should say "No access for that...", and not the help page

    do you see the same help page? or is a topic page?

    what version of CB, iConomy, and Permissions are you using?
     
  4. Offline

    fknretard

    Magik, I'm having the same issue with always being given the help menu...
    After looking at my server log, I'm getting this error:
    Code:
    2011-04-06 22:02:16 [SEVERE] Could not load plugins\Permissions.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
    Not quite sure why my permissions plugin stopped working. Once I get it working, I'll let you know if it fixes ICL.

    Just a space after one of the ' in permissions. Totally fixed ICL and everything works great.

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

    minisjofisk

    When I type an command as /icl select, or sumthing like that all I get is the help command, the one u get when typing /icl help..
    Please help me, this would be the perfect plugin for my server :p
     
  6. Offline

    Shanev

    @Ash88@Magik:

    I would suggest to keep this plugin as simple as possible, withouth such a high number of commands, since this is the cause I'm using it ;) So what I would suggest:

    1. A Claim-Full-Height: true/false option in the config: For simple horizontal area management with full hight

    2. /icl expand [landID] up/down [number/full*]: for expanding the Area you've bought manually (you then have to pay for it - full block price or a fixed percentage of the area price for each expansion**)

    3. As for horizontal expansion I would suggest a command like "/icl join [landID1] [landID2]", so you could simply buy an area [ID2] which is adjacent to your other area [ID1] and then simply join both areas to [ID1]. So you could easily expand your land as you wish.

    * for a maximum expansion
    ** Example: You buy an area for 10.000. Then you could either expand it for up/down-level*10.000 (2 levels down = 20.000) OR up/down-level*25%of10.000 (2 levels down = 5.000)

    I'd be happy with 1. and 3., since I don't want it to become too complicated ;)

    - Furthermore, I woud suggest, if this is possible, to implement an option in the config, which lets you decide whether you pay for every block in the vertical area, or just those youre selecting with your tool. But only if Claim-Full-Height: true.
     
  7. Offline

    Helghast

    This is it ! So easy to solve, but so annoying when you don't know of it :p
    My thanks to you (and to Magik, by the way ;) )
     
  8. Offline

    NoPride

    Hello

    Thanks for this mod it seems to be working %99 accept it doesn't charge to the iconomy players account, it charges zero but has the correct price in brackets when they are purchasing land. what could be causing this, thanks in advanced!

    Dan


    Edit: Thanks Shanev. i rushed thing and put that no charge permission on... i feel stupid now
     
  9. Offline

    Shanev

    I had the same error when being in the Admin group of permissions plugin. I guess it has sth to do with the permissions your players have? As default user with only:

    - 'icoland.list'
    - 'icoland.select'
    - 'icoland.info'
    - 'icoland.buy'
    - 'icoland.sell'
    - 'icoland.edit'

    those permissions enabled it charges money on my server. Or else, take a closer look at the config file. I'm not using this plugin right now, but maybe there's an option to enable payment.
     
  10. Offline

    Nielscorn

    i have no idea why people can't build on their lands they bought? do they first have to add permissions?

    i gave my regular people this:


    - 'icoland.list'
    - 'icoland.select'
    - 'icoland.info'
    - 'icoland.buy'
    - 'icoland.sell'
    - 'icoland.edit'

    should i add something more?
    they can select a land and buy it but once they bought it can't place anything on it or break anything...

    i have a free build server but i want people to be able to protect their creations so the prevent build without perm should stay false for me right?

    When an owner does /icl edit 1 perms *nameofplayer* it doesnt work :S!
    he still can't place anything! btw, do they have to put their name or something else?

    this is my config:
    Addons-Enabled:
    noboom: true
    noenter: true
    heal: true
    nospawn: true
    announce: true
    noflow: true
    nofire: true
    Heal-Interval: 30
    Mob-Removal-Interval: 2
    Max-Land-Volume: 5000
    Max-Lands-Claimable: 10
    Prevent-Build-Without-Perm: false
    Min-Land-Volume: 10
    debug: false
    SalesTaxPercent: 80.0
    Addons-PricePerBlock:
    noboom: 1.0
    noenter: 2.0
    heal: 2.0
    nospawn: 2.0
    announce: 1.0
    noflow: 1.0
    nofire: 10.0
    Max-Total-Blocks-Claimable: 5000
    PricePerBlock-Raw: 1.0
     
  11. Offline

    Ash88

    Yes, by default people don't have permission to build on land they select and buy. After selecting and buying they then have to add themselves to the permission list.

    Right.

    /icl edit 1 perms Ash88:t

    Notice the colon and t - this means "true" to allow the user to build/destroy. An "f" means do not let them build destroy. Maybe you forgot the colon?

    Hopefully that helps!

    I can appreciate keeping it simple. As a counterpoint, just because the advanced selection options are there doesn't mean you need to use them. But forgetting all of the fancy options an "expand x up" and "expand x down" would be awesome.

    Your idea about joining lands is inspiring. The idea of having multiple cuboids of lands all administered under a single entity.

    /icl join 9 10 - joins the lands 9 and 10. 10 will no longer be managed directly, but instead is part of 9. All settings applied to 9 going forward are also applied to 10. At the time of issuing this command all addons on 9 also most be purchased for 10. Any addons on 10 that are not on 9 are automatically sold. The "announce" addon only announces when you cross from somewhere into 9 or 10 ... but not if you cross from 9 into 10 or viceversa.

    /icl buy subland 9 - creates a subland within mainland #9. These lands pay their taxes automatically to the bigger land's owner (who, inturn, pays taxes on all his lands), and are able to set permissions on their smaller sub-land which only effect their smaller subland. They are purchased from the mainland holder, and if sold become part of the mainland holders land once again. The mainland holder could set the price-per-block, and would probably make it less than the price he paid.

    By default the whole subland should be located within the mainland, however the mainland owner should be able to toggle this on/off for certain users so that they can expand the mainland through their acquisitions. Maybe have it so that only a percentage of any land needs to be in the mainland. The new mainland cost would be paid by the owner to the system, and the subland owner would pay the cost of the subland to the landlord... or something.... this is too detailed at this point.

    Think of it - I can build a house in my Kingdom, put a forsale sign on it, and then sell that house and plot to someone... collect taxes... and so on. It opens up a whole new dynamic that is really cool.

    IgnoreYAxis=true - I can see this as a useful option for some servers. Essentially treat all Y axis as top to bottom automatically, and for purposes of figuring costs don't multiply by the Y axis. It really simplifies things for sure, but on the counter side it means mining could end up being annoying to dig - just because someone built a 3x3x3 house somewhere 70 blocks above you. It's a trade off, and I think it's a valuable one. Be interested to hear what Magik thinks about this.

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

    laerbn

    How often must taxes be paid? I'm not seeing a setting for it.
     
  13. Offline

    Ash88

    Not implemented - I only see the tag in the /info description so I assume he is heading that way. This is the only time I can say: "Taxes will be cool!"
     
  14. Offline

    Jorrdan

    users cant seem to edit the lands they make? Why is this?
     
  15. Offline

    Ash88

    Did they give themselves permission to after they bought the land?
     
  16. Offline

    Jorrdan

    Oh, i thought it automatically gave them permission... Will test this later on.
     
  17. Offline

    Magik

    In the next release, the owner will automatically get added to the permission list, previously I automatically just checked if the player was the owner, then allowed them to build, but it made the code cleaner jsut to check the perm list. I just forgot to add the default perm on creation.

    I really love the ideas guys. I think more advanced selection tools would be a great idea.

    here are some thoughts/comments on the ideas though:
    For expanding already build lands. Should I charge as soon as the player expands the plot? Or should I make some sort of confirmation screen to accept the changes? The confirmation would be difficult, but I also don't want to make it too easy to mess up a land and charge yourself a lot of money.

    For combining lands - at first I didn't think this was viable, as I would want to destroy the old lands, and recreate a new entity based on new corners - but if the new land doesn't make a rectangle, that's pretty much a no-go. But thinking about it a little. I don't think it would be TOOOOO difficult to make it so the cuboids are actually separate entities in the databse, and just treat them as the same land. It will be quite some work to get this working, but I think it's actually very possible. And I like the ability this would add to make odd shaped regions joined together.

    I think from this point out, new modifications/features in terms of land are going to be difficult. The way everything is set up right now, everything is very simple because there are no sub-zones and there are only cuboid areas. These new changes would require much more advanced searching algorithms to check what perms apply in certain places. But this is definitely the direction I want to take this plugin.

    I'm going to have take a small break though. I have a web devlopment job I have to put some attention into. And I've been wasting far too many work hours working on this! So dev pace might get a bit slower in the next few weeks. But I'm loving all the ideas guys.

    I'm glad to hear that things are working nicely for you guys.

    The next release will also incorporate taxes ( but only the type paid to the server ).

    The next release will also break your config files. I've changed the organization in there. And the way I'm using the config files right now, I will just blindly overwrite the file with whatever config I've loaded or defaulted to. So be sure to backup your config.yml before you update to the next version ( v2.14 ) - and manually re-enter your config into the new config.yml!


    After that, I think I may tackle these selection issues. Adding config to auto-claim full Y scale. And adding the expansion tools - e.g. /icl select expand up 1, /icl select expand north 1. From there I might also take a look into expanding existing areas with similar commands. And then after that, I will probably take a look at joining areas, or sub-zone delegation. Oh and I might squeeze in some way to sell a zone in there as well. But that may happen only after the area-joining/sub-zone delegation. I'm not quite sure yet.
     
  18. Offline

    Ash88

    Woohoo! Time to tax these mofos! It's my land, I'm your Lord - give me my due dammit!

    That's amazing man - thanks for the update. I for one am really excited about this plugin - the whole idea is lean, clean, and fantastic. Totally understand the need to work, and you know, get money for food and stuff.... If you lived nearby I would drive over HotPockets in exchange for new versions ;)

    Mmmm.... Hot Pockets....
     
  19. Offline

    Magik

    v2.14 released

    also, right now, taxes are only calculated using the raw block price ( no addons ). I may change that in the future, for now it will be as is, you guys can voice your opinion if you think it should include addons or some other way of calculating tax rates.

    and i hope the warning in the OP is enough, BUT BACK UP YOUR config.yml - THIS RELEASE WILL DELETE SOME OF YOUR SETTINGS IF YOU DO NOT

    changes:
    2.14-2.10
    • major config.yml overhaul ( reorganized, some things renamed )
    • added recurring taxes
    • added default owner perm when buying land
    • fixed creeper bug preventing it from exploding in noboom zones ( will boom, just not hurt blocks now )
    • added options for unclaimed land to have options for canboom/canburn/canbuild
    • removed damage from boom/fire when in noboom/nofire zone
    • bugfix - not loading when creating config.yml for first time
    • added depends ( on iConomy and Permissions ) in plugin.yml ( will throw an exception if not detected )
     
  20. Offline

    Shanev

    nice update :) nice plugin :) nice support :) Now there's only the "auto-claim Y scale feature " which I want most! When this is implemented then I'm gonna use it on my server! THX
     
  21. Offline

    IceReaper

    Correct me if im wrong cause i never did any java and didnt test it. but after reading you source this should be the way it should work:

    Code:
    To load and save the config param is has to be something like:
    
    FILE:Config.java
    
    Add to Config:
        public static boolean claimFullHeight = false;
    Add to Config.getConfig:
        claimFullHeight = false;
    Add to Config.loadConfig:
        claimFullHeight = config.getBoolean("Claim-Full-Height", false);
    Add to Config.saveConfig:
        config.setProperty("Claim-Full-Height", claimFullHeight);
      
    To make the param actualy do something it has to be something like:
    
    FILE:iCoLandPlayerListener.java
     
    Change in iCoLandPlayerListener.onPlayerInteract:
    FROM>
       if ( iCoLand.tmpCuboidMap.containsKey(playerName) ) {
          newCuboid = iCoLand.tmpCuboidMap.get(playerName);
          newCuboid.setLocation(loc);
       } else {
          newCuboid = new Cuboid(loc);
       }
    <FROM
    TO>
       if ( iCoLand.tmpCuboidMap.containsKey(playerName) ) {
          newCuboid = iCoLand.tmpCuboidMap.get(playerName);
          if ( Config.get("Claim-Full-Height") ) {
             loc.setY(127);
          }
          newCuboid.setLocation(loc);
       } else {
          if ( Config.get("Claim-Full-Height") ) {
             loc.setY(0);
          }
          newCuboid = new Cuboid(loc);
       }
    <TO
    
     
  22. Offline

    Magik

    more or less yeah

    updated to v2.16
    - added default auto select full height config option
    - added /icl select fullheight - to modify current selection to full height
    - added some other stuff, check changelog @ github
     
  23. Offline

    Helghast

    It's just perfect now :p Thank you Magik !
     
  24. Offline

    Ash88

    Hey magik -

    I'm getting a warning in the console, but everything is still working in game:
    22:17:04 [WARNING] [iCoLand] Error parsing tag: Ash88:t:t
    22:17:04 [WARNING] [iCoLand] Error parsing tag: Ash88:t:t:t:t
    22:17:04 [WARNING] [iCoLand] Error parsing tag: default:f:t:t
    22:17:04 [WARNING] [iCoLand] Error parsing tag: default:f:t:t:t

    I haven't ever put multiple colons/permissions on any land, but I have changed my permssions a few times now. Hope this helps!
     
  25. Offline

    Skadar

    Okay... just want to make sure. Does this plugin play nicely with WorldGuard regions? I've already got a city (multiple protected regions) set up. I certainly don't want players dropping down other, non-WorldGuard regions in the city and claiming them as their own.

    Is it possible to use WorldGuard and iCoLand together?
     
  26. Offline

    Magik

    Ewww... bug verified on my end... Hopefully I'll have a fix soon... thanks for the bug report

    but meh... your database is already slightly corrupted... Can you send me your lands.db.h2.db file? And I'll manually fix it?

    edit:
    ok, I fixed the permission editing bug - it should work now if you download the latest iConomy v2.17

    also, looking at the code, your database should be fine, no need for me to clean it. The way the code works, any perm it can't parse gets thrown out - and when you do an /icl edit, it will parse the perms, throw out the bad ones, and update the DB with the new ones.

    So any lands that used to throw that error, just run another /icl edit <id> perms <tags> on them, and it throw that error on the console once, and shouldn't do it again for that land.

    Um... I don't believe they will work together =(

    Alternatively, you could get them to somewhat play nice if you just claim the worldguard'ed zone with an admin iCoLand zone...

    Either that or I would have to figure out some way to access WorldGuard's zones ( which is going to be a pain as IIRC they are non-rectangular now )
     
  27. Offline

    Skadar

    Okay! I appreciate the quick response. Cheers!
     
  28. Offline

    WarhawkXeroFire

    Question: When I loaded up iCoLand 2.17, it runs great, but it doesn't seem to link with iConomy for some reason. I can plot out a section worth, say, $4500, but when I buy it with a balance of, say $200, it says: "Bought select land for $0 ($4500)

    Tad annoying, considering that people could buy up land for nothing. Something I am doing wrong? iConomy links up with other plugins just fine, and its only this plugin.

    EDIT: It seems to only do that with admins. Any way of changing that, so that admins still pay for the selected zones?
     
  29. Offline

    Magik

    dont give the perm icoland.nocost
     
  30. Offline

    tenach

    When someone buys unowned land, is there a way to move their money into a 'global' account instead of destroying it? I am building a server where money is generated by converting gold (using gold as the standard) and I don't like the idea of money just being destroyed - it defeats the purpose of having a circulating economy.
     
  31. Offline

    Magik

    i can definitely implement that easily
     

Share This Page