mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 18:50:51 +01:00
SPIGOT-7761: Ender pearl does not damage or spawn endermites
By: md_5 <git@md-5.net>
This commit is contained in:
parent
7feadbf2ee
commit
199310d0bd
2 changed files with 3 additions and 3 deletions
|
@ -566,7 +566,7 @@
|
||||||
+ // SPIGOT-5171: Triggered on join
|
+ // SPIGOT-5171: Triggered on join
|
||||||
+ if (from.equals(to)) {
|
+ if (from.equals(to)) {
|
||||||
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
||||||
+ return false; // CraftBukkit - Return event status
|
+ return true; // CraftBukkit - Return event status
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), cause);
|
+ PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), cause);
|
||||||
|
@ -583,7 +583,7 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
||||||
+ return event.isCancelled(); // CraftBukkit - Return event status
|
+ return !event.isCancelled(); // CraftBukkit - Return event status
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void teleport(Location dest) {
|
+ public void teleport(Location dest) {
|
||||||
|
|
|
@ -1062,7 +1062,7 @@
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } else {
|
||||||
+ // player teleport event is called in the underlining code
|
+ // player teleport event is called in the underlining code
|
||||||
+ if (((EntityPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), java.util.Collections.emptySet(), cause)) {
|
+ if (!((EntityPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), java.util.Collections.emptySet(), cause)) {
|
||||||
+ return Optional.empty();
|
+ return Optional.empty();
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue