Skip to content

Commit f68fe4c

Browse files
committed
Prevented teleport cancelled message after teleporting
1 parent c27129f commit f68fe4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/datdeveloper/datmoddingapi/delayedEvents/DelayedTeleportEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void execute() {
5959

6060
@Override
6161
public boolean shouldRequeue(boolean hasFinished) {
62-
if (startingPos.distToCenterSqr(player.position()) > 1) {
62+
if (!hasFinished && startingPos.distToCenterSqr(player.position()) > 1) {
6363
player.sendSystemMessage(Component.literal(DatChatFormatting.TextColour.ERROR + "Teleport cancelled"));
6464
return false;
6565
}

0 commit comments

Comments
 (0)