Player Movement Plugin

Discussion in 'Plugin Development' started by najib333, Apr 21, 2015.

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

    najib333

    Im currently working on a project that reenacts the wasd key by using custom commands. I'm able to move the player forward and backwards using the 'knockback' code:
    Code:
    player.setVelocity(player.getLocation().getDirection().multiply(+1));
    The problem im facing is to be able to move left and right using commands. What I have been thinking is using the yaw to determine the sides im going to face but I have no idea to implement it.

    Help is much appreciated.
     
  2. @najib333 Minecraft player movement really isn't designed for this sort of thing, so it won't look smooth most of the time. Why do you want to make such a plugin anyway?
     
  3. Offline

    najib333

    I was requested by my supervisor to do this. And he said this was pretty easy. Thing is, i also thought that such plugin is kinda pointless. But i still need to get it done though :/
     
  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    najib333

    I cant say no to my supervisor. Im on intern. Haha. I also dont know why would they ask me to do such stuffs. So, anyone gt any ideas?
     
  6. Offline

    timtower Administrator Administrator Moderator

    @najib333 Weird company that you need to make Bukkit plugins.....
    Let him define left and right, is that relative to the player or to the world? You probably need to perform some math on this. Math that I don't know and can't find.
     
  7. Offline

    najib333

    Well, its not a company actually. Its a research institution in my local university.

    What he meant left and right is that it is relative to the player. It acts like the 'WASD' key when we move the player.
     
Thread Status:
Not open for further replies.

Share This Page