Class AdvancementUtils
java.lang.Object
com.fren_gor.ultimateAdvancementAPI.util.AdvancementUtils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MinecraftKeyWrapper
static final MinecraftKeyWrapper
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
checkTeamProgressionNotNull
(TeamProgression progression) static void
checkTeamProgressionNotNull
(TeamProgression progression, UUID uuid) static void
Disable vanilla advancement.static void
displayToast
(@NotNull Player player, @NotNull ItemStack icon, @NotNull String title, @NotNull AdvancementFrameType frame) Displays a custom toast to a player.static void
displayToastDuringUpdate
(@NotNull Player player, @NotNull Advancement advancement) static @NotNull BaseComponent[]
static @NotNull BaseComponent[]
fromStringList
(@NotNull List<String> list) static @NotNull TeamProgression
progressionFromPlayer
(@NotNull Player player, @NotNull AdvancementTab tab) static @NotNull TeamProgression
progressionFromPlayer
(@NotNull Player player, @NotNull Advancement advancement) static @NotNull TeamProgression
progressionFromUUID
(@NotNull UUID uuid, @NotNull AdvancementTab tab) static @NotNull TeamProgression
progressionFromUUID
(@NotNull UUID uuid, @NotNull Advancement advancement) static void
runSync
(@NotNull AdvancementMain main, long delay, @NotNull Runnable runnable) static void
runSync
(@NotNull AdvancementMain main, @NotNull Runnable runnable) static void
static void
static boolean
uuidFromPlayer
(@NotNull OfflinePlayer player) uuidFromPlayer
(@NotNull Player player) static void
validateIncrement
(int increment) static int
validateProgressionValue
(int progression) static void
validateProgressionValueStrict
(int progression, int maxProgression) static TeamProgression
-
Field Details
-
ROOT_KEY
-
NOTIFICATION_KEY
-
-
Method Details
-
displayToast
public static void displayToast(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack icon, @NotNull @NotNull String title, @NotNull @NotNull AdvancementFrameType frame) Displays a custom toast to a player.- Parameters:
player
- A player to show the toast.icon
- The displayed item of the toast.title
- The displayed title of the toast.frame
- TheAdvancementFrameType
of the toast.- See Also:
-
displayToastDuringUpdate
-
disableVanillaAdvancements
Disable vanilla advancement.- Throws:
Exception
- If disabling goes wrong.- See Also:
-
fromStringList
-
fromStringList
-
startsWithEmptyLine
-
validateProgressionValue
-
validateProgressionValueStrict
public static void validateProgressionValueStrict(int progression, int maxProgression) -
validateIncrement
public static void validateIncrement(int increment) -
validateTeamProgression
@Contract("null -> fail; !null -> param1") public static TeamProgression validateTeamProgression(TeamProgression pro) -
checkTeamProgressionNotNull
-
checkTeamProgressionNotNull
-
checkSync
public static void checkSync() -
runSync
-
runSync
-
runSync
-
runSync
-
uuidFromPlayer
-
uuidFromPlayer
-
progressionFromPlayer
@NotNull public static @NotNull TeamProgression progressionFromPlayer(@NotNull @NotNull Player player, @NotNull @NotNull Advancement advancement) -
progressionFromUUID
@NotNull public static @NotNull TeamProgression progressionFromUUID(@NotNull @NotNull UUID uuid, @NotNull @NotNull Advancement advancement) -
progressionFromPlayer
@NotNull public static @NotNull TeamProgression progressionFromPlayer(@NotNull @NotNull Player player, @NotNull @NotNull AdvancementTab tab) -
progressionFromUUID
@NotNull public static @NotNull TeamProgression progressionFromUUID(@NotNull @NotNull UUID uuid, @NotNull @NotNull AdvancementTab tab)
-