Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
fcf419512d
Fixes: SPIGOT-2380 SPIGOT-1124 SPIGOT-2322 SPIGOT-2348
23 Zeilen
1.1 KiB
Diff
23 Zeilen
1.1 KiB
Diff
From 0cb35fe76a8bd74a6f5c029cf8d4632bd5f1cd82 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sat, 11 Jun 2016 22:36:12 -0500
|
|
Subject: [PATCH] SPIGOT-1124: Changed To-Location on Teleport event ignored
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index cf27086..16db36e 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -682,7 +682,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|
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();
|
|
--
|
|
2.8.3
|
|
|