Hey guys, I am after a plugin that will shoot a player towards a destination upon the trigger of a pressure plate or stepping on any block. So basically a player would stand on said block, and get shot out towards a destination that has been specified. Sort of like the sponges on MCCTF. I know that plugins exist that have this functionality but I haven't been able to find one that shoots the player towards a destination not the direction they are facing. If a plugin like this exists, or it is not possible, please let me know! Thanks!
I think that all it takes is a triggered tnt explosion for the player to be lounged a certain destination.
It is possible to launch the player in a direction with .setVelocity(); but it would be nearly impossible to calculate where they would land or the needed Vector to make them land there due to lag and player movement.
No idea if this will work, it may need tweaking... But basic idea: PHP: Location loc = ... //where you want them to shoot to. Replace with whateverplayer.setVelocity(player.getLocation().toVector().subtract(loc.toVector())); Basic idea. It might overshoot the player a bit, which is why it needs tweaking. If that won't work, then you would just calculate it with trig.
Axe2760 And it will shoot in a straight line( making it impossible to use without being at height 250 ) And there isn't anything for gravity counter measures
It means that if there are blocks in the path between the points that you will crash agains them, you need to jump over them
timtower derp. but the OP wanted them like MCCTF's/McPvP's. I crash into walls and ceilings with them all the time. You just have to make them in an open space. Not too big an issue IMO.
Axe2760 McPvP's uses blocks under it to figure out which direction to launch the player (although the way it launches is a bit weird, I think it does setVelocity many times throughout the launch).
timtower Axe2760 MCCTF was just a basic example. It would be great if it were possible to set a flight path, like going to the required height before falling back down in an arc formation. This is for my server spawn. The spawn consists of a main floating island surrounded by other smaller islands. These smaller islands are not aligned height wise with the main island and are higher up. What I am after is a plugin that whenever a player steps on a certain pressure plate or block, it doesnt matter, they will be flung up and onto the other islands in an arc formation, a straight line would not work because of the island heights. Sorry for not making this clearer. Just an idea to put out there (i have no idea whether this is possible and/or even going to work)... How about the possibility to set the top turning point of the arc,that way the plugin could first send the player there before sending them back down to the new island. Thanks so much for the responses! I really appreciate it.