Collision For Players

Discussion in 'Archived: Plugin Requests' started by brinaq, Feb 11, 2013.

  1. Offline

    brinaq

    Hello, I often would play games with my friends on my private server including pushing each other around in the game, like off cliffs, into holes, and onto a spot.
    Since an update, however, I have not been able to do this because collision between players no longer exists in Minecraft. I would like a plugin that adds back this collision feature into Minecraft for my server.
    BASICS; WHAT IT IS
    A simple plugin to add collision between players, so that they may push each other around as they did a few updates ago and as they can still do with mobs and monsters.

    COMMANDS (OPTIONAL)
    I was thinking that perhaps there could be commands to enable and dissable collision for players, so they could be like this:
    /collision enable
    and
    /collision disable

    WHEN I WANT IT BY
    as soon as possible please ;)

    Boomp

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  2. Offline

    WinterBottom

    I think that requires a client mod, Bukkit don't have anything to do with player collisions.
     
  3. Offline

    bennie3211

    but before there was player collision, so why should this be done with a (client)mod?
     
  4. Offline

    Mango

    It's theoretically possible to do server-side in a plugin, but it would take up a lot of CPU and would not be very smooth or accurate.
     
  5. Offline

    tremor

    Necro Bump - I find this to be an interesting topic at the moment, was looking into it for an idea or two, would like to see a comment or two from some more devs with better logic for yes/no that whats in the thread above.
     
  6. Offline

    xTrollxDudex

  7. Offline

    AndyMcB1

    Exactly my thoughts
     
  8. Offline

    Me4502

    What's wrong with necroing an old request? It's better than creating a new thread for exactly the same thing.

    Now, to do this you'd have to a) Use NMS, and onPlayerMove check the bounding boxes for collisions with the other online players. If they intersect, increase both players velocities slightly in the opposite directions, OR increase the velocity of the player that didn't move away from the one that did. Overall, pretty simple codewise.. But it may be CPU intensive depending on the amount of people on the server.
     
  9. Online

    timtower Administrator Administrator Moderator

    Me4502 And it isn't even a real necro :p
     
  10. If you make an array with everyone inside of the server inside of it then used Player players : <array name> and also used if(player.getlocation() = players.getlocation()){} inside of a player move event you could make this right?
     
  11. Offline

    Me4502

    dajako No, that would not work properly and be incredibly innefficient, my way listed above is the best way to do this
     
  12. Ok :)
     

Share This Page