Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-1124: Changed To-Location on Teleport event ignored
Dieser Commit ist enthalten in:
Ursprung
0bc2724e51
Commit
e2ff10bdcd
@ -446,7 +446,7 @@
|
|||||||
+ PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
+ PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
||||||
+ this.server.getPluginManager().callEvent(event);
|
+ 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
|
+ set.clear(); // Can't relative teleport
|
||||||
+ to = event.isCancelled() ? event.getFrom() : event.getTo();
|
+ to = event.isCancelled() ? event.getFrom() : event.getTo();
|
||||||
+ d0 = to.getX();
|
+ d0 = to.getX();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren