This is an abstract storage system example built into a plugin. It is from a premium plugin I have developed called LobbyGames.
I wanted to put this code out here as an example for others to reference on how to build a storage system for your plugin that is capable of storing data multiple ways. This example can store data both in .yml files or in a MySQL database.