Smallish

Discussion in 'Plugin Requests' started by Resoluciones, Sep 7, 2019.

  1. Offline

    Resoluciones

    Plugin category: World Editing and Management

    Minecraft version: Paper version git-Paper-186 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

    Suggested name:
    Smallish

    What I want: I would like to limit the world's folders sizes so they do not grow infinitely, which makes the backups increasingly difficult. Is it possible to do this with a plugin or do you suggest other methods?

    Ideas for commands: Not needed.

    Ideas for permissions: Not needed.

    Ideas for configuration:

    world:
    - world: 2 # number means max folder size in GB
    - wold_the_end: 5

    When I'd like it by: when possible.

    Thanks for your help in this important matter!
     
  2. Offline

    CraftCreeper6

    @Resoluciones
    I see this being a big problem. If players so much as join, or build anything they risk it not being saved on account of the limited world size.
     
  3. Online

    timtower Moderator Moderator

  4. Offline

    Resoluciones

    Thanks timtower I've used worldborder in the past and i don't like the way it limits the world, with a cirlce or rectangle around a point. Minecraft as we know is based on the constant world creation as players explore and worldborder goes against this Minecraft core point.

    So, if we just delete parts of the world that have been without players from a x number of days, that would help to limit world sizes, right? In this case, I think https://www.spigotmc.org/resources/regionerator.12219/ does that. I will ask in the plugin's forum to see if this could help to get small world sizes.
     
  5. Offline

    Blooby

    Only way you're going to get this is if you add a world border, unless you want needed folders being deleted such as player data.
     
  6. Offline

    Resoluciones

    Playerdata you said??? That folder is only 1.81 Mb that is not a problem at all in terms of folder size, why do you mention that folder? Or do you mean that deleting those little files will lower the size of the region folder?

    The size problem is the region folder size (30.2GB), so if the plugin Regionerator deletes unused regions (or any other plugin that can be made that takes care of this), in theory it will solve the issue, don't you think so?

    [​IMG]

    [​IMG]

    Worldborder is not a good plugin as affects gameplay as I said, so it's not an nice option in this case.

    In example a plugin that automatically deletes this "old" .mca files maybe solves this issue, in case you can create one:

    [​IMG]
     
    Last edited: Sep 7, 2019
  7. Offline

    KarimAKL

    @Resoluciones So you want region files to be deleted if no players have been within the chunk for a specified amount of time?
     
  8. Offline

    Resoluciones

    yes exactly Karim! if possible
    Thanks!
     
  9. Offline

    Blooby

    That's a rather hard plugin to create as it has to constantly check chunks which will then fore cause lag. The developer would have to find a way around the lag, I don't foresee someone doing this for free.

    You're also using 1.14.4, use the built in world border system via /worldborder in game and it will give you prompts; you can also google it or watch Youtube for a tutorial.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  10. Online

    timtower Moderator Moderator

    You can do file checks on a separate thread. Won't have any impact on the server.
    And if you limit the amount of chunks that you check every ... time then you are minimizing it. And based on the fact that Bukkit runs with 20 ticks per second: plenty of time for the checks.
     
  11. Offline

    Resoluciones

    Thanks for you posts!

    Sorry for placing an opinion, as I don't know anything about making plugins. But wouldn't be easier to just run some kind of "file deleter" that "reads" the file changed date of mca files and in case they are like 2 months old (configurable) just delete those files once every 24 hours or so?

    Thanks!

    EDIT: If you just can make a plugin with the command: /deleteoldmca or something like that, I can implement that command to be run by console in a scheduled time.
     
  12. Online

    timtower Moderator Moderator

    I really appreciate the honesty there ;)
    It would, would be a preferred method as well in my opinion.
    But you need to keep in mind that area's like spawn (where chunks don't change) might get removed due to this.

    A different method is to keep track of which chunks get loaded and have a timer per chunk.
    If the timer runs out then the chunk can get removed.
    On the first run of the plugin it could analyze all region files and give them a standard timer to work with.

    Might attempt this actually, uncommon request that has a nice touch for me.
     
  13. Offline

    Resoluciones

    I understand. Do you know what defines a "change" in a chunk? In example someone that opens and closes a door inside a chunk or an item falling on the ground and being despawned by the garbage collector; are those "time changers" for the chunk?

    TRACKING FOR CHUNKS: In case you try this, pls. kindly try not to generate a file that would be expanding forever, as I've seen that in some plugins that tracks things in the server; sometimes they expand their sizes forever and they end generating lag, not for the process they make, but for loading and saving that big file. I don't know if I explain myself correctly, let me know.

    Thanks!!!!
     
  14. Online

    timtower Moderator Moderator

    Door: yes, changes the state.
    Rest: no idea.

    Need to track it somehow, but when a chunk gets removed then the item in the list can get removed as well.
    When you save the file can also cause issues, if you do it every time a chunk gets changed: yeah, then it can get laggy.
    If you do it on shutdown: sure, no problem.

    If the first version doesn't work as intended then splitting files is also an option.
     
  15. Offline

    Resoluciones

    Everything understood, thanks, in case you have time to try to make this plugin it would be great!!!
     
  16. Online

    timtower Moderator Moderator

    @Resoluciones So I made an attempt.
    Logs all chunks loads and player movement to a config.
    Config gets checked it it has any chunk it in that can be removed.
    Then it tries to remove those files.

    Just found out that minecraft stores its chunks in the files that you posted a screenshot of. But those files are not a single chunk. They are 1024 chunks.
    Getting minecraft to remove specific ones is not something that is in the API.
    Can't help you with this one.
     
  17. Offline

    Resoluciones

    @timtower It's clear timtower, thanks for taking the time to do the attempt!

    Do you think we could go ahead with the other option? I mean, implementing a /deleteoldmca command to remove those old 1024 chunks files, unknowledging the risks you metioned before.

    Let me know!

    Thanks!
     
  18. Online

    timtower Moderator Moderator

    @Resoluciones The thing with that is that I have no idea how many times those files are saved.
    Might be trying to delete one that is actively being used. Not gonna risk that.
     
  19. Offline

    Resoluciones

    @timtower would it be possible to avoid that risk including something like this in the config.yml?

    - onlydeletefilesolderthan: 60 # number in days

    or something similar.

    Thanks!

    EDIT: Of course, I would back up regularly, in order to monitor the effects of the plugin, so we would be sure to not deleting constructions in use.

    EDIT2: In case you didn't start making the plugin, don't start it; as Regionerator seems to be doing its job correctly, as it has reduced the world size to 4GB, almost 10% up to now. Thanks.
     
    Last edited: Sep 17, 2019 at 3:58 PM

Share This Page