Persistence + No More Singleton - #44
Conversation
|
@Mr-Deej @VoChiDanh |
|
@Pasarus |
|
hmmmmm 🤔 |
| fileInputStream.close(); | ||
| } catch (Exception ex) { | ||
| ex.printStackTrace(); | ||
| this.data = new HashMap<>(); |
There was a problem hiding this comment.
Are you sure you don't want to just exit out if it fails to load? Or are you ok with what I am guessing is a brand new vanilla factions implementation, the issue being what happens after? does it just save over the old bits?
There was a problem hiding this comment.
Hmm it looks like as of right now if it fails, the data is essentially cleared? Yeah we might want to exit here.
| * | ||
| */ | ||
| public void save() { | ||
| // TODO: implement |
There was a problem hiding this comment.
I'm probably over-complicating it, but I have had trouble wrapping my head around how to implement this method with the new system.
| fileInputStream.close(); | ||
| } catch (Exception ex) { | ||
| ex.printStackTrace(); | ||
| this.data = new HashMap<>(); |
| * | ||
| */ | ||
| public void save() { | ||
| // TODO: implement |
Getting most recent changes from the main branch.
|
The data handler classes now implement the data interfaces. This will make it easier to transition to using them instead of the PersistentData class. |
…tead of the PersistentData class.
|
It is now possible to save faction data, but loading doesn't appear to work correctly. I'm also running into this error upon faction creation:
|
|
I might move to a database solution for this project, rather than using JSON. |
|
@alyphen |
The changes in this PR are intended to make factions, power records and territory chunks persistent.