Giter Site home page Giter Site logo

Comments (12)

ChrisLane avatar ChrisLane commented on August 28, 2024

These changes sound good to me. Thoughts on having AlphaChest able to store more item data e.g. NBT data?

This would fix mod items having various aspects wiped upon loading items from the save file.

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

What sort of NBT data are you wanting to be stored? Can you please give me an example?

from bukkit-alphachest.

ChrisLane avatar ChrisLane commented on August 28, 2024

Well for example in Flan's mod there are vehicles with inventories and fuel levels saved in NBT data. Currently those inventories and fuel levels are wiped at restarts.

I can see why this wouldn't be added since the plugin already handles all default MC cases and the addition could just bloat the plugin more. I'm unsure on how much would need to be changed to implement this so let me know 😄

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

Hmm, adding NBT data support wouldn't be such an easy task. I'll look into it though and see if I can come up with anything. No guarantees though.

Also, could kroimon or Brianetta please let me know if you're happy with doing something like this? Once you do, I will be able to start work on it and get something done within a few days.

from bukkit-alphachest.

Brianetta avatar Brianetta commented on August 28, 2024

Sorry I didn't get to this sooner.

I'm happy to give this the nod. Database support is always welcome (and makes storage of additional info such as NBT tags so much easier), and adhering to established conventions makes maintenance easier.

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

Hey, no problem. I'm sure you had good reason not to.

As for the update idea, the only main concern would be with people updating the plugin to such a newer version and not noticing that there have been changes in the configuration options and permissions. I do have an idea in mind of a system that update existing configs automatically by replacing the old option names with the new ones while keeping any settings that users may have made to it. Additionally, any new configuration options would be added to the existing one as well. This would be a possible solution to avoiding any serious problems that may arise with plugin and config settings. On the other hand, permissions are a whole different problem. Users of the plugin who would want to update to this new version would have to change their current permissions to the new ones.

Any input you have on these main two concerns? (config changes & permissions changes)

from bukkit-alphachest.

Brianetta avatar Brianetta commented on August 28, 2024

AlphaChest already has a couple of points in its release history where configuration and storage has changed. In each case, it only supported automatically upgrading form the last version. This keeps the code less complex, and assumes that server admins keep their servers' plugins up to date.

Permissions changes are, as you note, extra work for the server admin. It's work that they should only ever need to do once, though.

Perhaps we should treat this as a reason to bump the major version. Seeing version 2.0 should indicate that there are changes which makes it worth reading the README, and that can do into the detail needed, about permissions being reworked and the storage back-end choices being improved.

Of course, that also gives us the opportunity to think about any other changes we might want to incorporate.

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

Alright, yeah. I agree with you on that.

I've started doing some work on the plugin which you can see on my forked AlphaChest repo if you want but I'm not ready to submit a pull request yet.

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

I have run into an issue though. So I have put together a new config.yml which I'm fairly happy with. It's essentially the same as before but just reformatted and a little nicer.

I spent some time looking into a way of updating old configs and I did come up with a possible option however, it requires the use of the config.set methods and then plugin.saveConfig(). For some reason, plugin.saveConfig() actually strips the config of all comments and blank lines. This is a bit of a problem as the comments in the config really are quite necessary and I don't think it would be a good idea to have a system which strips them.

The only solution I could come up with which really isn't much of a solution but basically it backs up the old config by renaming it to (config_old.yml) and then generating a new fresh config.yml. Backing up the old one might seem a little pointless but I just thought some people might prefer that their old config not get completely removed just in case they happen to want to use it some time. Here's the new config I put together so you can have a look at it: https://github.com/ShadowRanger/Bukkit-AlphaChest/blob/master/src/main/resources/config.yml

If you have an idea for another way of dealing with the config situation please let me know. I haven't been able to find any other solution so yeah, just let me know.

from bukkit-alphachest.

Brianetta avatar Brianetta commented on August 28, 2024

Unless and until the configuration API supports comments, I'd leave it un-commented and document it in the README. Every time the plugin saves its config the comments will be destroyed, unless we implement our own config handler.

from bukkit-alphachest.

ShadowRanger avatar ShadowRanger commented on August 28, 2024

Alright I actually did try something like that already so ill swap to that system tomorrow when I have the time and then push a commit to my GitHub fork of the AlphaChest repo. I'll let you know when I do.

On another note, it would be great if kroimon could create a wiki on this repo, the one that's build into GitHub. Would be a great alternative for documentation instead of the README.

from bukkit-alphachest.

samtaber avatar samtaber commented on August 28, 2024

did this ever happen? lol

from bukkit-alphachest.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.