How to get players to see where?

Discussion in 'Plugin Development' started by 936796603, Jul 24, 2017.

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

    936796603

    I want to achieve: the player forward to send 10 grid distance
    version:1.7.2
    please help me!
     
    Last edited by a moderator: Jul 24, 2017
  2. Offline

    timtower Moderator Moderator

    @936796603 As developer? As server owner? Why that version?
     
  3. Offline

    936796603

    The version is the Minecraft version because I used the old version

    I am a student, the development plugin is my hobby

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  4. Offline

    timtower Moderator Moderator

    @936796603 You still don't say if you need code or a plugin.
    There is no reason to stay on that ancient version though.
     
  5. Offline

    936796603

    @timtower Because my friend's server is the version, I see the tutorial is that version

    @timtower Can you help me?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  6. Offline

    timtower Moderator Moderator

    @936796603 What tutorial? And tell your friend to update.
    And you still haven't said if you need code or a plugin.
     
  7. Offline

    936796603

    @timtower Find tutorials on the internet

    @timtower I think he will not update

    @timtower My friend's server is just a small suit.
    His server just for entertainment

    @timtower I need to code

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  8. Offline

    timtower Moderator Moderator

    @936796603 I still have no idea what you want.
    But please, stop double posting.
    Please answer the next questions:
    1. What is the goal?
    2. What do you have?
    3. Do you know Java already?
     
  9. Offline

    936796603

    The goal is to develop a Naruto plugin, I only have computer and youth, I learned javaSE

    @timtower I am now worrying about the delivery of the substitute technique, the avatar has not yet developed, but there is a rough idea

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  10. Offline

    timtower Moderator Moderator

    @936796603 Turn that rough idea into a solid idea first. Then you can think about the code.
     
  11. Offline

    936796603

    @timtower At present is because the code will not, so only help
     
  12. Offline

    timtower Moderator Moderator

    @936796603 I don't get that line.
    Could you rephrase it please?
     
  13. Offline

    936796603

    @timtower Which line?

    @timtower I just want to know how to let the player to the front to send 10 grid distance code

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  14. Offline

    timtower Moderator Moderator

    @936796603 Get the position and way they are looking.
    Turn that looking direction into a vector.
    Add that vector to the position.
     
  15. Offline

    936796603

    @timtower Can you give me some code, because I did not understand the Bukkit API documentation, do not ask me why, because I am a foreigner
     
  16. Offline

    timtower Moderator Moderator

    @936796603 Everybody is a foreigner on the internet.
    Nobody on here will just give you the code for it.
    Making a full sized Naruto plugin will prove a very big challenge if you don't understand the documentation.
     
  17. Offline

    936796603

    @timtower I can not read english,I use the Google Translate and chat with you.

    I can only read a part English

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 26, 2017
  18. Offline

    Zombie_Striker

    @936796603
    1. We will not support ancient versions. There is no reason to stay on older updates, as posted in this thread. We will provide help assuming you are on the newest version, but if it does not work on 1.7, then it is up to you to either update or figure it out yourself.
    2. If you want to reply to this thread, after you already made a reply, click the edit button and add what you want to say. Do not double post.
    3. We do not provide code here. We are here to help you solve your problem, not write your plugin for you.
    Again, to achieve the '10 block grid distance', do the following:
    1. Create a Location instance. This should be equal to the player's location.
    2. Create a Vector. This is equal to the player's location's direction (player#getLocation().getDirection()). This is the direction the player is looking. Use the .normalize method so all numbers are between 0 and 1.
    3. Create a for loop. This will loop up to 10, starting at 0.
    4. Inside the loop, spawn a particle at the location. You can either use the World#spawnParticle method, or use one of the many utils already out there.
    5. After that, add the vector to the location, using Location#add(Vector);.
     
  19. Offline

    936796603

  20. Offline

    Zombie_Striker

    @936796603
    If your problem has been solved, mark this thread as solved.
     
    936796603 likes this.
  21. Offline

    936796603

  22. Offline

    Machine Maker

    @936796603
    In the upper right part of the thread, to the right of the title, there is a button Edit Thread. Click it and change the prefix of the thread to Solved
     
Thread Status:
Not open for further replies.

Share This Page