blob: ed69dc9c219a785abb8d46599f41c074792a9bda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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
|