Stop players from moving eachother

Discussion in 'Plugin Development' started by Chipmunk9998, Jan 24, 2012.

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

    Chipmunk9998

    Hey, is there a way I can make it so players can't push each other when they walk near them? I really need this for a project.

    Thanks!
     
  2. Offline

    AbeJ

    Unfortunately, pushing is handled client-side. You would have to modify the client, or use some ugly trickery to cancel move events when they seem to be triggered by being pushed.
     
  3. Offline

    Chipmunk9998

    Well, is there a way I could check if a player is being pushed by another player? Or how would I go about checking if it seems like they're being pushed? I've been working on this for hours. :/
     
  4. Offline

    xpansive

    That doesnt seem like it would be client side, because that would mean that any client could change the location of other players, and clearly you can't do that.
     
  5. Offline

    tkausl

    This is Clientside. Your own Client will push you away if any Player push you.
     
  6. Offline

    Chipmunk9998

    Yeah, I would think it is client sided, because when you lose connection to a server you can still get pushed by other players.
     
  7. Offline

    andersonhc

    maybe in onPlayerMove, using the event.getTo() you can check for a player in the location and cancel the event.

    anyway.. not worth it.
     
  8. Offline

    Chipmunk9998

    Well, my project is that when a player does a command, it pretty much constantly teleports them to another player. But the problem is, the 2 players move each other around, and I don't want that to happen. I want it to act as if the player never even teleported to them so the player who they're teleporting to doesn't know.

    If I don't get a way around this, my plugin will most likely fail.
     
  9. Isn't there a plugin called VanishNoPickup that hides you from other players?
     
  10. Offline

    Chipmunk9998

    Yeah, but I think you can still push the people. So it looks like if there was a way, someone would have figured it out by now. :/
     
  11. Offline

    Evangon

    Perhaps using onPlayerMove and using commands like /stopmove, then setting some varible true, store the location values when the command is executed, compare if it is true in onPlayerMove, force the player back into the location. Seems kinda ugly, and then again, I bet a newbie could come up with a better method.
    You can also just cancel onPlayerMove.
     
  12. Offline

    Chipmunk9998

    I found out one way to do it. By using Packet29DestroyEntity, I can make the player invisible and stop them from pushing, which is what I was going to do anyways. Well, off to continue development.
     
  13. Offline

    Daniel Heppner

    Yeah, player pushing is client side. If a client notices that a player is next to them, the player will be pushed (unless you have client hax). Making a player invisible will make it so player 1 doesn't get pushed because it has no idea that there even is a player there.

    Good luck.
     
Thread Status:
Not open for further replies.

Share This Page