package moe.ymc.acron.s2c; import com.google.gson.annotations.SerializedName; import com.mojang.authlib.GameProfile; import org.jetbrains.annotations.NotNull; import java.util.UUID; public record Entity(@SerializedName("name") @NotNull String name, @SerializedName("uuid") @NotNull UUID uuid) { public Entity(@NotNull net.minecraft.entity.Entity entity) { this(entity.getName().getString(), entity.getUuid()); } public Entity(@NotNull GameProfile profile) { this(profile.getName(), profile.getId()); } }