Easy Question: Schedule task + individual player events?

Discussion in 'Plugin Development' started by schools, Jun 26, 2011.

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

    schools

    My question is, can you have a scheduled repeating task which is cycling through the players of each world, and be able to get variables that are stored in individual player events via the PluginManager. I don't see a way to combine the two (which is understandable), but if there is, it would be EXTREMELY beneficial.
     
  2. Offline

    Weltall 7

    possible, use the Scheduler (look at the APIdocs)
    Why don't you simply use a HashMap<Player, SomeType> to store custom data?
     
    schools likes this.
  3. Offline

    schools

    The first part wasn't meant to be a question, I was just asking if I could combine the two currently available methods. I will look into the solution you provided, thanks!
     
  4. Offline

    schools

    So I had everything going great but for some reason I'm having some trouble with Hashmaps being able to "put" but not "get." I have a public static Hashmap in the main class, and in an event for when the player logs in it puts the data <player, boolean>. This works, because I can then get it directly after and it will work. BUT if I try to get it later from within the main class itself, I get funny null errors. I can't figure it out for the life of me...mainly because I'm tired of uploading, testing, and then reading the console errors so it's difficult to debug when you don't have that much time.
     
Thread Status:
Not open for further replies.

Share This Page