Skip to content

Commit

Permalink
fix: /tpofflh not working across worlds
Browse files Browse the repository at this point in the history
Signed-off-by: Thatsmusic99 <25277367+thatsmusic99@users.noreply.github.com>
  • Loading branch information
Thatsmusic99 committed Nov 23, 2023
1 parent 70bb8bd commit bc70b58
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -3,12 +3,7 @@
import io.github.niestrat99.advancedteleport.CoreClass;
import io.github.niestrat99.advancedteleport.config.CustomMessages;

import net.kyori.adventure.nbt.BinaryTag;
import net.kyori.adventure.nbt.BinaryTagIO;
import net.kyori.adventure.nbt.CompoundBinaryTag;
import net.kyori.adventure.nbt.DoubleBinaryTag;
import net.kyori.adventure.nbt.FloatBinaryTag;
import net.kyori.adventure.nbt.ListBinaryTag;
import net.kyori.adventure.nbt.*;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;

Expand Down Expand Up @@ -136,6 +131,9 @@ private static void setLocation(OfflinePlayer player, Location location) throws
builder.put("Pos", posTag.build());
builder.put("Rotation", rotTag.build());

builder.put("WorldUUIDMost", LongBinaryTag.of(location.getWorld().getUID().getMostSignificantBits()));
builder.put("WorldUUIDLeast", LongBinaryTag.of(location.getWorld().getUID().getLeastSignificantBits()));

BinaryTagIO.writer()
.write(builder.build(), dataFile.toPath(), BinaryTagIO.Compression.GZIP);
}
Expand Down

0 comments on commit bc70b58

Please sign in to comment.