Solved Running commands based on a certain direction?

Discussion in 'Plugin Development' started by JJScoder, Jun 6, 2018.

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

    JJScoder

    Hey Bukkit! I'm have a question. How do I do things based on the direction the player is facing.
    What would code would allow me to run the command /dir and if I were facing north it spawn a cat but if I were facing sound spawn a dog, and ect in the four major directions.
    Thanks!

    Also commenting or a description/breakdown of the code would be awesome because its alot harder to learn from just a block of code imo
     
  2. Online

    timtower Administrator Administrator Moderator

    @JJScoder You need to get the direction the player is looking in.
    Change that to the four major directions.
    Do something with it.
     
  3. Offline

    MightyOne

    timtower likes this.
  4. Offline

    JJScoder

  5. Online

    timtower Administrator Administrator Moderator

    @JJScoder Did you check the thread linked? There is a method in there:
     
  6. Offline

    JJScoder

    Oh, It linked to another post so I clicked that :p didn't scroll down! Thanks!
     
Thread Status:
Not open for further replies.

Share This Page