diff --git a/src/main/java/net/minestom/server/advancements/notifications/Notification.java b/src/main/java/net/minestom/server/advancements/notifications/Notification.java deleted file mode 100644 index e84bf5339aa..00000000000 --- a/src/main/java/net/minestom/server/advancements/notifications/Notification.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.minestom.server.advancements.notifications; - -import net.kyori.adventure.text.Component; -import net.minestom.server.advancements.FrameType; -import net.minestom.server.item.ItemStack; -import net.minestom.server.item.Material; -import org.jetbrains.annotations.NotNull; - -/** - * Represents a message which can be sent using the {@link NotificationCenter}. - * @since 1.0.0 - * @deprecated As of Minestom 22a8ccabfae38c53df0605000aa7eed49765c1ab, because the Maintainability is very hard and - * can break everytime from Mojang side because bad api design use {@link net.minestom.server.notifications.Notification#builder()} instead. - */ -@Deprecated(since = "1.4.1", forRemoval = true) -public record Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull ItemStack icon) { - public Notification(@NotNull Component title, @NotNull FrameType frameType, @NotNull Material icon) { - this(title, frameType, ItemStack.of(icon)); - } -} diff --git a/src/main/java/net/minestom/server/advancements/notifications/NotificationCenter.java b/src/main/java/net/minestom/server/advancements/notifications/NotificationCenter.java deleted file mode 100644 index 968c75fbd21..00000000000 --- a/src/main/java/net/minestom/server/advancements/notifications/NotificationCenter.java +++ /dev/null @@ -1,81 +0,0 @@ -package net.minestom.server.advancements.notifications; - -import net.kyori.adventure.text.Component; -import net.minestom.server.entity.Player; -import net.minestom.server.network.packet.server.play.AdvancementsPacket; -import org.jetbrains.annotations.NotNull; - -import java.util.Collection; -import java.util.List; - -/** - * @since 1.0.0 - * Used to send one or multiples {@link Notification}. - *
- * Works by sending a completed advancement and remove it immediately. - *
- * You can simply create a {@link Notification} object and call {@link #send(Notification, Player)}.
- * @deprecated As of Minestom 22a8ccabfae38c53df0605000aa7eed49765c1ab, because the Maintainability is very hard and
- * can break everytime from Mojang side because bad api design use {@link net.minestom.server.notifications.Notification#builder()} instead.
- */
-@Deprecated(since = "1.4.1", forRemoval = true)
-public final class NotificationCenter {
- private static final String IDENTIFIER = "minestom:notification";
- private static final AdvancementsPacket REMOVE_PACKET = new AdvancementsPacket(false, List.of(), List.of(IDENTIFIER), List.of());
-
- /**
- * Can't create an instance, use the static methods instead.
- */
- private NotificationCenter() {
- }
-
- /**
- * Send a {@link Notification} to one player.
- *
- * @param notification the {@link Notification} to send
- * @param player the player to send the notification to
- */
- public static void send(@NotNull Notification notification, @NotNull Player player) {
- player.sendPacket(createPacket(notification));
- player.sendPacket(REMOVE_PACKET);
- }
-
- /**
- * Send a {@link Notification} to a collection of players.
- *
- * @param notification the {@link Notification} to send
- * @param players the collection of players to send the notification to
- */
- public static void send(@NotNull Notification notification, @NotNull Collection