Purchasable Skills/Abilities per Payer

Discussion in 'Spigot Plugin Development' started by redzulu1, May 20, 2017.

  1. So. For a minigame I am currently coding players can use skills/abilities, these skills/abilities must be bought and can be upgraded EACH. So I was thinking of a way to do such a thing maybe by adding a TON of booleans and other instance variables to my minigame player class which seemed inefficient. Instead; what I had done was use an abstract class called Skill and make other classes that extend Skill, such as the individual skills classes. This all works well for executing the skills ability and such but it has no intent of being player specific. I've been struggling to find a good system to to manage what skills a player has and what level that skill is. If anyone has any suggestions, even a few words, I would greatly appreciate it!
  2. Well if you are using bungeecord for your minigame, MySQL would be a good suggestion for storing stuff like this.
  3. Map<UUID, GameParticipant> - GameParticipant is a class, which stores the player's skills, etc. In this map, you link the player's UUID to these class instances. The GameParticipant class should have the Skill variables inside it.
  4. Seems like a good idea! A second player obj class to store other values. Okay thanks, I will try it out.
    Any other suggestions welcome!
  5. The goal of this is to keep the data in my original player class but have a system to manage it. Like a Skill class or sorts... I don't know, still open to suggestions.
    I'm trying to save on instance variables that I have to save to a database