Solved Bukkit Problem: 2 events in a row?

Discussion in 'Plugin Development' started by FameForAim, Jan 6, 2015.

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

    FameForAim

    Hi everyone,
    i stuck at the plugin i am currently working on.
    I have already a PlayerInteract event with a special item, which if its true sends player a message which he should answer in chat with a Y (yes) or a N (no). But how do i check the "ChatEvent" as following of the interact event?
    Can someone help please.
    Thanks.

    Greetz
    FameForAim
     
  2. Offline

    AdamQpzm

    @FameForAim Inside the interact event, you'll want to note down the player in some sort of field (a Map, or a List, or a Set or whatever), and inside the chat event you'll want to check that they're there. You might also want to remove them from the field under other events (i.e. leaving, teleporting away, etc), or make your field store the time to be time dependant. Depends on your requirements :)
     
    FameForAim likes this.
  3. Offline

    teej107

    Bukkit's ConversationAPI
     
    FameForAim likes this.
  4. Offline

    FameForAim

    ok thanks for this :) i think i managed it
     
  5. Offline

    Jaaakee224

    @FameForAim
    Don't forget to set this to Solved if you have found a solution for your problem.
     
  6. Offline

    FameForAim

    oh ok :D i always thought moderators will do that :)
    #solved
     
Thread Status:
Not open for further replies.

Share This Page