Skip to content

Commit

Permalink
fix offline teleport method StackOverflow (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
YouHaveTrouble committed Jan 22, 2022
1 parent 762fcdd commit c672eea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions patches/server/0227-Extended-OfflinePlayer-API.patch
Expand Up @@ -223,7 +223,7 @@ index 88bc0807e8bf66a65422f85f1112336334eb3de2..d0e822b329085b9d0a42276c3cacd6cb
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 944d0e118e0bed160fc6e40a147c043aade1599f..f4ed262e51a0cc64df56dfc23ba816c23c5ce11e 100644
index 944d0e118e0bed160fc6e40a147c043aade1599f..9a90d084a05ad4865f3cd2d3b9cf1d7e3e0466d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1967,6 +1967,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Expand All @@ -233,22 +233,22 @@ index 944d0e118e0bed160fc6e40a147c043aade1599f..f4ed262e51a0cc64df56dfc23ba816c2
+ // Purpur start - OfflinePlayer API
+ @Override
+ public boolean teleportOffline(@NotNull Location destination) {
+ return ((OfflinePlayer)this).teleportOffline(destination);
+ return this.teleport(destination);
+ }
+
+ @Override
+ public boolean teleportOffline(Location destination, PlayerTeleportEvent.TeleportCause cause) {
+ return ((OfflinePlayer)this).teleportOffline(destination, cause);
+ return this.teleport(destination, cause);
+ }
+
+ @Override
+ public java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(@NotNull Location destination) {
+ return ((OfflinePlayer)this).teleportOfflineAsync(destination);
+ return this.teleportAsync(destination);
+ }
+
+ @Override
+ public java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(@NotNull Location destination, PlayerTeleportEvent.TeleportCause cause) {
+ return ((OfflinePlayer)this).teleportOfflineAsync(destination, cause);
+ return this.teleportAsync(destination, cause);
+ }
+ // Purpur end - OfflinePlayer API
+
Expand Down

0 comments on commit c672eea

Please sign in to comment.