EasyChestLock almost no ram usage?

Discussion in 'Plugin Development' started by JanTuck, Sep 10, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    JanTuck

    Hi my name is Jan iam currently developing a low ram usage ChestLockplugin (Ik Lockette doesnt use much)
    It saves the location of the chests along with the owner in datastorage what are the downsides to this?
    How much ram will my plugin use?
    Could someone examine my plugin let me know what is bad and what is good?

    Plugin + Source code:
    Plugin:
    https://drive.google.com/file/d/0B6G2SqSC4gf3eGpUYzZkWjN4RkE/view?usp=sharing
    Source Code:
    https://drive.google.com/file/d/0B6G2SqSC4gf3cG9IY3F4TkxMSW8/view?usp=sharing
    or
    http://pastebin.com/aZqbrDvL
    or
    https://github.com/JanSTuck/EasyChestProtection
     
    Last edited: Sep 10, 2016
  2. Offline

    Zombie_Striker

    @JanTuck
    Please post the code at either PasteBin.com (if it's only one or two classes) or on Github.com (if you have lots of classes). No one here wants (or at least should not want) to download any "plugins" here. Especially if it has not been reviewed by Bukkit first (as in scanned for malware and viruses).
     
  3. Offline

    JanTuck

    Sorry my love, first timer ;)

    Could you btw, tell me how to upload to github from linux?
     
    Last edited: Sep 10, 2016
  4. Offline

    Zombie_Striker

    @JanTuck
    If you're using a web browser, it should be the same for all OSs.
    • Sign into an account
    • Top right corner, Click the "+"
    • New Repos.
    • Fill out the data.
    • Click "Upload file" and upload the file(s) you want to add.
     
  5. Offline

    JanTuck

    Last edited: Sep 10, 2016
  6. Offline

    timtower Administrator Administrator Moderator

    @JanTuck Any form of data storage will use RAM.
    The question is how much do you need to store?
    How many times is it gonna be called?

    The amount of data that this will use depends on the amount of chests in the world at the same time.
    No chests means no data for this plugin.

    But I will doubt it that there will be issues with it, and if so: try to do what Lockette does (as it doesn't store anything)
     
  7. Offline

    JanTuck

    Thanks for the input do you think it is possible to add nbt data directly to the chest? So when it its placed i put the owner and other stuff inside? Or not possible?
     
  8. Offline

    timtower Administrator Administrator Moderator

    @JanTuck Not something that I have experience with. But I believe that it won't be saved when the server stops.
     
  9. Offline

    JanTuck

    Well in theory could i add a piece of paper to the last spot of the chest and put the UUid of thr owner in there? Or will this annoy players that iam making one slot unusable?

    Sent from Tapatalk
     
  10. Offline

    timtower Administrator Administrator Moderator

    @JanTuck I think that they won't like it that much.
     
  11. Offline

    JanTuck

    Well just a thought ;)

    Sent from Tapatalk
     
  12. @JanTuck Saving UUID and Location will take very little memory I don't think you really need to worry about ram usage.
     
  13. Offline

    JanTuck

    Thanks for the information ;)

    Sent from Tapatalk
     
  14. Offline

    I Al Istannen

    @timtower
    Tile entity NBT should stay, as it is the way minecraft saves it's data (like DisplayName).
    Just tested it and you are sadly right. Only the standard tags are saved *heavy sigh*.

    So @bwfcwalshy, don't even try to save any data on the entites with NBT, except they can be stored in the default fields. Modification of any attribute and stuff is safe though.
     
Thread Status:
Not open for further replies.

Share This Page