mirror of
https://github.com/PaperMC/Folia.git
synced 2025-02-19 01:51:59 +01:00
Add missing throw for ServerPlayer#teleport override
All teleports must use teleportAsync, so we need to throw on the old implementations to prevent their usage.
This commit is contained in:
parent
81b9f70be9
commit
e7bb50eac6
@ -188,7 +188,7 @@
|
|||||||
} else {
|
} else {
|
||||||
LOGGER.warn("Failed to spawn player ender pearl in level ({}), skipping", optional.get());
|
LOGGER.warn("Failed to spawn player ender pearl in level ({}), skipping", optional.get());
|
||||||
}
|
}
|
||||||
@@ -1357,6 +_,324 @@
|
@@ -1357,9 +_,332 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,6 +513,14 @@
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public ServerPlayer teleport(TeleportTransition teleportTransition) {
|
public ServerPlayer teleport(TeleportTransition teleportTransition) {
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ if (true) {
|
||||||
|
+ throw new UnsupportedOperationException("Must use teleportAsync while in region threading");
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
if (this.isSleeping()) return null; // CraftBukkit - SPIGOT-3154
|
||||||
|
if (this.isRemoved()) {
|
||||||
|
return null;
|
||||||
@@ -2398,6 +_,11 @@
|
@@ -2398,6 +_,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user