Using Events with scoreboard scores?

Discussion in 'Plugin Development' started by Mrcool234, Apr 27, 2014.

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

    Mrcool234

    Im making a Pacman plugin and the whole objective of the game is to pickup as many steaks on the ground as you can but when i make a scoreboard i can't add the amount of items the picked up in the score.getScore() how do i do this? Thank you

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    BillyBobJoe168

    Well, there are 2 ways you can do this. If you have your scoreboard in your main class and you have a player listener class, just have have a scheduler keep checking how many items the player has and just set the score to that. If you have the scoreboard in the same class, just have a PlayerPickupItemEvent and just have that set the score to getScore() + 1
     
Thread Status:
Not open for further replies.

Share This Page