Rust-style land claim

Discussion in 'Plugin Requests' started by adi0115, Mar 31, 2019.

  1. Offline

    adi0115

    Plugin category: Factions/Building

    Minecraft version: 1.8

    Suggested name: CupboardClaim

    What I want: I'm looking for rust-style claim plugin, where you place "cupboards" to claim land/bases and to up-keep the bases and prevent them from decaying, you have to fill up the cupboard with specific item from inside the cupboard which get consumed every hour.

    Cupboards: these can be set in the config to what the item they will be, for example iron block, when a player places a iron block on the ground, they will get a message in chat, saying that a cupboard was placed, t n block and they will get a GUI with two options: Upkeep and Authorisation. Clicking upkeep will open double-chest GUI where players can drop items to upkeep their land, upkeep amount is determine on what type of blocks and the amount are placed withing the radius of the iron block or also knowed as "Cupboard". The cupboard will protect 10x10 area (can be changed in the config), if there are 40 wooden planks and 10 cobble withing the protection area of the cupboardm w , that will the hourtly consumtion rate from Upkeep menu, every hour 40 wooden planks and 10 cobble will be removed from the upkeep, if there is in-sufficient amount of blocks in the Upkeep, certain blocks will start randomly despawning every 10 minutes (1 block every 10 minutes), the blocks that can be despawned is determine by a list inside the config, such as wooden planks, cobble, chests, furnaces, crafting tables, glass ect, the last item to be despawned is always the cupboard itself when there's no more block to despawn, this will allow natural blocks and terrain not to despawn, such as stone, grass, ores ect.

    You should also be able to add custom upkeep items in the config such as adding a iron door equals to 6 iron upkeep, so if someone has a iron door withing their protected land, they will need 6 iron ingots to upkeep. Maybe on top of the Upkeep GUI, enchanted blocks would show up which would display the current upkeep, so if someone has 10 wooden planks protected, 10 enchanted wooden planks would show in the GUI.

    For the GUI option: Authorisation, this allows players to click and allow themself to build in the protected area and obviously edit aswell. Maybe a list can be also displayed as a lore of the item of people allowed. The person that placed the cupboard is allowed to clear the list by right clicking and is the only person allowed to break the cupboard aswell.

    Ideas for commands: /cc reload - reloads the config

    Ideas for permissions: cc.admin - permission to reload the config

    When I'd like it by: By the end of this week
     
  2. Offline

    TheSaltyOne

    I am actually working on this.. But it will take longer than a week.. Especially since I have way too many projects atm...
     
  3. Offline

    KarimAKL

    @TheSaltyOne On top of that the week has already gone by, this thread was made March 31st.
     
  4. Offline

    adi0115

    I understand the plugin is pretty big for what it is, I expected for someone to get it done withing a week and then add another week on top of that one for testing and bug fixing. This is a pretty unique plugin and that has not been done yet and I'm sure if someone would actually want to maintain it after they're done, they could make some money by selling it. I'm still highly interested in this plugin.
     
  5. Offline

    adi0115

    @TheSaltyOne Wondering if you're still working on this?
     
  6. Offline

    adi0115

  7. Offline

    CryoCrafter

    Id also like to see this plugin as my server is somewhat a remake of rust
     
  8. Offline

    RealizmHF

    This sounds fun to work on, I’ve been a java developer for 4 years now and just recently decided to start making plugins. I can definitely take a crack at this but this shouldn’t stop someone who would know the spigot/Bukkit API better as I’m just starting out with it making simple plugins. This doesn’t sound too complex.

    Question, when a block is removed due to no upkeep items, does the removed block leave a drop or no?

    Also, I may just do a command for the list of authorized players to show up in the players chat. Though my idea for it involves the inventory GUI, I’m not sure I will have enough time with the API to do it the way I’d like with GUI.

    For clarity, I’ll summarize so I’m sure of what you’re asking as I know little to nothing about Rust.

    A block of your configurable choice is the Cupboard
    Cupboards have a configurable plot radius
    When placed, only the player who placed the cupboard may edit blocks within radius
    When initially placed, a new Inventory appears with 2 options
    Option 1: Authorize, that lets the player authorize other players the same access to the plot (place/break, open chests, etc). However, only the player that placed the Cupboard can destroy it.
    A list of authorized players also can appear in some form or another

    Option 2: Place items for “upkeep”
    Upkeep simply takes a new item from the Inventory of the Cupboard
    Items are taken at configurable times
    All items have a configurable upkeep time
    When an item is not found in the Cupboard inventory, a random block from the plot is destroyed every X
    The random blocks that are removalable is configurable
    Where X is a configurable amount of time
    The Cupboard is the last destroyed block
     
    Last edited: May 30, 2019
  9. Offline

    adi0115

    @RealizmHF Thanks for taking up this plugin request.To answer your question:
    The block should be removed without a drop.

    When it comes to your summary, you got everything spot on. I did miss one crucial part of this plugin and it's that different materials in Rust have different amount of health which means they decay at different paces, so for example, wood would decay faster than obsidian.

    With this plugin, you should be able to set the health of different blocks inside the config, so for example spruce wood has "50" health, so every X amount of time, 1 health is taken away from the building and when it gets to 0, it will destroy as it should do. Right clicking a block should show it's health in chat. Blocks that are placed without a cupboard should decay after X amount of time.

    I would also suggest to watch this video, it's 3 minutes long and goes over the a tool cupboard is and how it works.
     
  10. Offline

    RealizmHF

    Okay sounds great, I already have a layout of how I’m going to go about making this. But again, haven’t worked with the API much yet so bugs are sure to happen lol.
     
  11. Offline

    RealizmHF

    Just an update, I've done quite a bit of the backend part of this plugin so far. It's turning out nicely so far, and I'm adding a few less obvious "features" that I assume would be nice to have.

    For instance, due to the way I structured my code, when you change the cupboard block to a different type, old cupboards will still be active. And new cupboards will only be created using the new configured block type. Configurable messages when players created a cupboard, try to destroy a cupboard, try to destroy land in a cupboard, etc.

    This is turning out to be a rather larger project than I expected, especially since I'm trying to do this right with all of the features that make sense. So it'll take me a little while longer. So long as I have time, I should have this done by next week.


    EDIT:

    Do authorized players have access to add to the upkeep and remove from the upkeep?

    Do authorized players have access to authorize other players?

    How do players re-open the cupboard for upkeep? Do they click on the cupboard like a chest?
    Or perhaps they must be inside the cupboard radius when using /rc upkeep or some other command?

    Can cupboards overlap?
    For instance, an authorized player places the configured cupboard block inside the cupboard they are authorized in. I could make it so they cannot overlap, or I could let them overlap and auto-authorize players for any overlapping cupboard areas. But I'm not sure how the Rust mechanics are, if this is a way of expanding your base size or not.

    Do you want cupboards to be able to have different sizes? As of now, they'll have whatever the configured radius size is. But I can make it so each individual cupboard has it's own size that could increased/decreased later through in-game purchases or something.
     
    Last edited: Jun 3, 2019
  12. Offline

    adi0115

    @RealizmHF Thanks for the update, to answer your questions:
    Yes, all authorized players can add stuff to the upkeep and remove it aswell.

    No, the player himself in person has to authorize themselfs and they have to be in person to un-authorize themselfs aswell but anyone authorized can remove everyone at once, but not individual people.

    They have to right click the cupboard block just like a chest.

    Only one cupboard can be placed, placing any other cupboards inside of another cupboard's protection radius will not be placed. Your question also gave me an idea, I think there should be "dead-space" between each cupboard protection radius. So if 'Player A' places down a cupboard, 'Player B' can't place a cupboard withing the radius of 'Player A's cupboard +5 unclaimed blocks, this will prevent players placing cupboards right on the border of other cupboard.

    That sounds like a really good idea.
     
  13. Offline

    RealizmHF

    This is a bit confusing to me, so for clarity sake, I’ll summarize.

    Only the owner may authorize/unauthorize individual players.
    Players that wish to be authorized must be inside the Cupboard radius.
    Players that have been authorized may unauthorize everyone at once, except the owner.

    No problem, I’ll add a configurable space for this as well.

    I’ll be making a command that can increase/decrease individual Cupboards sizes rather than hooking into Vault or anything as I have yet to work with Vault, and I’d hate to create any dependencies for a single feature. So when increasing/decreasing individual Cupboards, you’ll have to have a plug-in that can execute the command when purchased or something.

    If I continue adding to this plugin, I may add other features I have in mind such as configurable sized Cupboard so Iron Block is a size 10 Cupboard, gold block is 20, etc. but that’s too much effort on top of what I’m doing now and an unrequested feature. So maybe for the future. Though I have enjoyed making this plugin.
     
    Last edited: Jun 3, 2019
  14. Offline

    adi0115

    You almost got there but no worries, this is what I meant:
    Player has to right click the cupboard and authorize themselfs, same goes for if they want to unauthorize themselfs
    Players that have been authorized may unauthorize everyone at once, including the owner and themselfs
    Players cannot be authorized unless they authorize themselfs inside the cupboard

    The reason why it's importand for the owner to be cleared by other players, is so incase of an raid, the raiders can get access to the cupboard, clear everyone and add themselfs and basically "take over" the base. This will make players be creative at hiding and defending the cupboards to make sure players can't easily take over the base during a raid. (This is how cupboard works in Rust and I really the way it works).
     
  15. Offline

    RealizmHF

    Okay great, I can definitely do this. Thank you for the clarity! I was unaware of raiding, for some reason I pictured more of a friendly Towny type server for this lol. I would say 70% of this is done. I’ll be uploading this to spigot with a bunch of info on it and link it here once complete.

    The biggest parts I need to finish are the inventory GUI, though the backend is done. And I want to add support for newer versions. Probably 1.12, 1.13, and 1.14 as those seem to be the more commonly used versions as of late. A few small details need to be coded and I will be adding the radius to individual claims.
     
  16. Offline

    RealizmHF

    Most everything is done. Just working out the bugs. I got married this weekend so I haven’t been working on this since Thursday, but I will continue work on this today :D
     
  17. Offline

    CryoCrafter

    Have a nice honeymoon!!!!! Congrats
     
  18. Offline

    RealizmHF

    This plugin would probably work much better if it simply kept track of the player placed blocks within the cupboard and destroyed those randomly when the upkeep is not met. So that is how I currently have this setup, rather than configurable blocks. As your original post seems to be hinting to the fact that you don't want the terrain destroyed, just the player placed blocks.

    Also, does the claim have an infinite Y-value? Or should the claim only take up the Y-value that is the configured radius. If the Y-value is infinite, a claim will own all blocks above and beneath it. If the Y-value is the same radius as the X-value and Z-value, players can place/destroy blocks that are above/below the claim. So if the radius were 10, a player could destroy or build just 11 blocks below/above that claim. As of now, the Y-value is infinite, but this would take me just 10sec to change.

    Currently, all players can only own a single claim due to the way I created this. I realize this could be an issue, so I will be fixing this in the future. Though my initial release will allow just a single claim per player. It will take me just a few hours to switch over to multiple claims per user and bug test. But I thought this was worth a mention.

    Other Notable Future Updates (Most could be VIP Access Only):
    - /rc time <my_claim>
    ---- See just how much time until the upkeep runs out for this claim. Permission Options: only if authorized. only if owner.

    - /rc tp <my_claim>
    ---- Teleport to this claim. Permission Options: only if authorized. only if owner.

    -/rc upkeep <my_claim>
    ---- Open up the claim's upkeep. Permission Options: only if authorized. only if owner.

    - /rc authorize <my_claim> <player>
    ---- Authorize a player. Permission Options: only if authorized. only if owner.

    - /rc claims
    ---- List of claims by owner. Permission Options: can use. shows locations.
     
  19. Offline

    adi0115

    @RealizmHF I would prefer for the Y-axis to be infinite, or from bedrock to build limit.

    So far it looks good :)
     
  20. Offline

    RealizmHF

    Still working on this, I haven't added a few updates to the GitHub version but it's open source if anyone else wishes to look it over. Fairly well documented code, easy to read spacing.

    I've been having a lot come up with work and such recently that I haven't had too much time to work on this. Here is a link for what I have so far.

    https://github.com/RealizmHF/RustClaim
     

Share This Page