3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch
Zach Brown fcf419512d
Backport a few 1.10 fixes that should are relevant for 1.9.4
Fixes:
SPIGOT-2380
SPIGOT-1124
SPIGOT-2322
SPIGOT-2348
2016-06-11 22:52:15 -05:00

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