mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
Clone the vector that is passed to the VelocityEvent
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
ddbbeb2729
commit
5fff5eb88c
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityHuman.java Sat Dec 6 21:26:20 2014
|
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityHuman.java 2014-12-07 11:26:13.489010423 +0000
|
||||||
+++ src/main/java/net/minecraft/server/EntityHuman.java Sat Dec 6 21:26:07 2014
|
+++ src/main/java/net/minecraft/server/EntityHuman.java 2014-12-07 11:25:50.801010669 +0000
|
||||||
@@ -8,13 +8,27 @@
|
@@ -8,13 +8,27 @@
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -306,7 +306,7 @@
|
|||||||
+ Player player = (Player) entity.getBukkitEntity();
|
+ Player player = (Player) entity.getBukkitEntity();
|
||||||
+ org.bukkit.util.Vector velocity = new Vector( d0, d1, d2 );
|
+ org.bukkit.util.Vector velocity = new Vector( d0, d1, d2 );
|
||||||
+
|
+
|
||||||
+ PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity);
|
+ PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
|
||||||
+ world.getServer().getPluginManager().callEvent(event);
|
+ world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user