Question about player variables

Discussion in 'Plugin Development' started by DutchChris, May 5, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    DutchChris

    Hello everyone,

    I want to make a skill-like plugin where players get xp from doing stuff like mining. By creating a variable called "int xp" and then adding xp by using xp++ every player would get xp whenever someone breaks a block, which I don't want. If anyone knows how I can make seperate xp variables(or if you think theres a better way of doing this) for each player then please let me know.

    - DutchChris
     
  2. Offline

    timtower Administrator Administrator Moderator

    @DutchChris Make a HashMap<UUID, int> to store it per player.
     
  3. Offline

    DutchChris

    Thanks, ill give it a try!
     
Thread Status:
Not open for further replies.

Share This Page