jensjeflensje / websk

Create websites using Skript!
MIT License
9 stars 4 forks source link

A lot of bug fixes and new features! #54

Open Norbiros opened 2 years ago

Norbiros commented 2 years ago

Changes

To Do

ItsTheSky commented 2 years ago

Like reloading the webSK configuration?

Norbiros commented 2 years ago

Great idea!

ItsTheSky commented 2 years ago

No but it was a question about that 😂

Information about config updates (@SkyCraft78 maybe you know how we can update config?)

Norbiros commented 2 years ago

No but it was a question about that joy

Information about config updates (@SkyCraft78 maybe you know how we can update config?)

Oh, I meant updates, for example:

Version 1.0:

name: WebSK
files: true

Version 2.0:

name: WebSK
files-server: true
config: true

(I removed files and I added files-server and config)

And how we can change values to add/remove elements in config without clearing data? I meant something like creating migrations. Now I only added simple warning at line 53

ItsTheSky commented 2 years ago

You can use / create a sort of getOrSetDefault method (if the specified key doesn't exists, it will sets it to the default provided value)

Norbiros commented 2 years ago

So we can create file like migrations/Migration01.java and it should detect values specific for version (for example files) and if it finds that it runs code that saves current config to memory, loads new one and replaces data with data in memory. You can also create renaming rules and things like that. I can start work on that :)

But how you fix that problem in DiSky?

Norbiros commented 2 years ago

Maybe we can add config-version to config?

ItsTheSky commented 2 years ago

As you wish, both way are usable & should works

ItsTheSky commented 2 years ago

Should I merge this PR ?