mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 02:01:44 +01:00
SPIGOT-1124: Changed To-Location on Teleport event ignored
This commit is contained in:
parent
0bc2724e51
commit
e2ff10bdcd
1 changed files with 1 additions and 1 deletions
|
@ -446,7 +446,7 @@
|
|||
+ PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
||||
+ this.server.getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled() || to.equals(event.getTo())) {
|
||||
+ if (event.isCancelled() || !to.equals(event.getTo())) {
|
||||
+ set.clear(); // Can't relative teleport
|
||||
+ to = event.isCancelled() ? event.getFrom() : event.getTo();
|
||||
+ d0 = to.getX();
|
||||
|
|
Loading…
Reference in a new issue