|
|
@ -29,6 +29,7 @@ import lombok.experimental.Accessors;
|
|
|
|
import net.kyori.adventure.key.Key;
|
|
|
|
import net.kyori.adventure.key.Key;
|
|
|
|
import net.william278.husksync.HuskSync;
|
|
|
|
import net.william278.husksync.HuskSync;
|
|
|
|
import net.william278.husksync.user.OnlineUser;
|
|
|
|
import net.william278.husksync.user.OnlineUser;
|
|
|
|
|
|
|
|
import org.apache.commons.text.WordUtils;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
|
|
|
|
|
|
@ -146,6 +147,12 @@ public interface Data {
|
|
|
|
@SerializedName("show_particles") boolean showParticles,
|
|
|
|
@SerializedName("show_particles") boolean showParticles,
|
|
|
|
@SerializedName("has_icon") boolean hasIcon) {
|
|
|
|
@SerializedName("has_icon") boolean hasIcon) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
|
|
|
|
private String asString() {
|
|
|
|
|
|
|
|
return "[❌] %s %s (⏰ %d:%02d)".formatted(WordUtils.capitalizeFully(type()),
|
|
|
|
|
|
|
|
amplifier(), duration() / (60 * 1000), (duration() / 1000) % 60);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -167,6 +174,7 @@ public interface Data {
|
|
|
|
|
|
|
|
|
|
|
|
void setCompleted(@NotNull List<Advancement> completed);
|
|
|
|
void setCompleted(@NotNull List<Advancement> completed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
|
|
|
class Advancement {
|
|
|
|
class Advancement {
|
|
|
|
@SerializedName("key")
|
|
|
|
@SerializedName("key")
|
|
|
|
private String key;
|
|
|
|
private String key;
|
|
|
@ -179,10 +187,6 @@ public interface Data {
|
|
|
|
this.completedCriteria = adaptDateMap(completedCriteria);
|
|
|
|
this.completedCriteria = adaptDateMap(completedCriteria);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
|
|
|
|
private Advancement() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
@NotNull
|
|
|
|
public static Advancement adapt(@NotNull String key, @NotNull Map<String, Date> completedCriteria) {
|
|
|
|
public static Advancement adapt(@NotNull String key, @NotNull Map<String, Date> completedCriteria) {
|
|
|
|
return new Advancement(key, completedCriteria);
|
|
|
|
return new Advancement(key, completedCriteria);
|
|
|
|