MagmaGuy / EliteMobs

This is a spigot plugin that aims to extend Minecraft's survival endgame by making mobs more interesting.
http://www.magmaguy.com
GNU General Public License v3.0
162 stars 61 forks source link

File/Structure tidyup #10

Closed TomLewis closed 5 years ago

TomLewis commented 5 years ago

The files are a mess. You have 2 versions of files: playerCache, playerGuildrank, playerMaxGuildRank, PlayerMoneyData. I assume they were moved to a data folder, but were originally in the root folder, then the blanks just kept there? It makes sense moving them to the data folder, but why on earth is ItemsCustomLootList.yml in the data folder then? this isn't player data, and the other item configs are in the main root? you could have an items folder and put all item data in that folder.

I have each of my plugins stored on github so that I can work with my team to update them, things like playerdata is gitignored, you cant just gitignore the data folder this way.

MagmaGuy commented 5 years ago

I agree I need to clean up those files, my IDE has messed up updates I've done to the structure throughout development. The ItemsCustomLootList.yml is in the data folder because the data folder contains not player data but rather unique server data. The items are meant to be expanded upon by admins - I personally have hundreds of custom entries on my network - which plays into the unique data side of things. The real reason I created that folder was to give admins an easy way to mass reset the configuration files without losing any data that they created or was generated through player efforts. All you'd have to do is delete anything not in the data folder.

TomLewis commented 5 years ago

If you want to save player data and allow people to wipe files, with thousands of players, you need to store player data in a database, have items in an items folder, boss mobs in a boss folder. If you MUST use flatfile for user data storage, at the very least separate it into its own folder, as a very large example, look at EssentialsX they have a "userdata" folder. MySQL would be preferred.

The current data folder does not make any sense to have an items list in it.

MagmaGuy commented 5 years ago

MySQL integration is in the list of things that I want to do at some point, but it's not a huge priority for me. The data folder is what it is because it makes sense to my workflow; maybe I'll rethink the structure when I get around to doing actual databases.

MagmaGuy commented 5 years ago

Files have been somewhat restructured (recently fixed the bug that left blank files behind, didn't initially understand what the issue getting reported was). MySQL will be implemented when I have a better idea of what kind of data I want to store long-term and also when I have the time to learn how to use it safely.