From 981b623ee714df4f062fbeed7f286870abc1bff8 Mon Sep 17 00:00:00 2001 From: d0by Date: Mon, 2 Oct 2023 02:10:29 +0200 Subject: [PATCH] Cleanup --- .../holograms/api/hologram/HologramConfig.java | 4 ++-- .../holograms/api/hologram/line/HologramLineType.java | 4 ---- .../decentsoftware/holograms/nms/NMSAdapter_v1_8_R2.java | 9 +-------- .../decentsoftware/holograms/nms/NMSAdapter_v1_8_R3.java | 9 +-------- .../holograms/animations/AnimationRegistry.java | 1 - .../holograms/hologram/line/DefaultHologramLine.java | 5 ----- .../holograms/utils/pinger/PingerResponse.java | 3 +++ 7 files changed, 7 insertions(+), 28 deletions(-) diff --git a/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/HologramConfig.java b/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/HologramConfig.java index cd325f4..045fe9a 100644 --- a/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/HologramConfig.java +++ b/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/HologramConfig.java @@ -50,14 +50,14 @@ public interface HologramConfig { /** * Save the hologram file. * - * @return True if the operation was successful, false otherwise in a {@link CompletableFuture}. + * @return CompletableFuture that completes when the operation is finished. */ CompletableFuture save(); /** * Reload the hologram file. * - * @return True if the operation was successful, false otherwise in a {@link CompletableFuture}. + * @return CompletableFuture that completes when the operation is finished. */ CompletableFuture reload(); diff --git a/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/line/HologramLineType.java b/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/line/HologramLineType.java index 81b392f..0b03fc7 100644 --- a/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/line/HologramLineType.java +++ b/decent-holograms-api/src/main/java/eu/decentsoftware/holograms/api/hologram/line/HologramLineType.java @@ -50,9 +50,5 @@ public enum HologramLineType { * A line displaying an Entity. */ ENTITY, - /** - * A line, made of multiple lines, displaying an image. - */ - IMAGE, UNKNOWN } diff --git a/decent-holograms-nms/decent-holograms-v1_8_R2/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R2.java b/decent-holograms-nms/decent-holograms-v1_8_R2/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R2.java index d1f4f49..f301576 100644 --- a/decent-holograms-nms/decent-holograms-v1_8_R2/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R2.java +++ b/decent-holograms-nms/decent-holograms-v1_8_R2/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R2.java @@ -324,16 +324,9 @@ public int getFreeEntityId() { } } + @SuppressWarnings("deprecation") @Override public int getEntityTypeId(EntityType type) { - // TODO: Find a better way to get the entity type id - if (type == EntityType.ARMOR_STAND) { - return 30; - } - if (type == EntityType.DROPPED_ITEM) { - return 2; - } - // noinspection deprecation return ENTITY_TYPE_NAME_ID_MAP == null ? type.getTypeId() : ENTITY_TYPE_NAME_ID_MAP.get(type.getName()); } diff --git a/decent-holograms-nms/decent-holograms-v1_8_R3/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R3.java b/decent-holograms-nms/decent-holograms-v1_8_R3/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R3.java index 3fc53b5..246e6ef 100644 --- a/decent-holograms-nms/decent-holograms-v1_8_R3/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R3.java +++ b/decent-holograms-nms/decent-holograms-v1_8_R3/src/main/java/eu/decentsoftware/holograms/nms/NMSAdapter_v1_8_R3.java @@ -328,16 +328,9 @@ public int getFreeEntityId() { } } + @SuppressWarnings("deprecation") @Override public int getEntityTypeId(EntityType type) { - // TODO: Find a better way to get the entity type id -// if (type == EntityType.ARMOR_STAND) { -// return 30; -// } -// if (type == EntityType.DROPPED_ITEM) { -// return 2; -// } - // noinspection deprecation return ENTITY_TYPE_NAME_ID_MAP == null ? type.getTypeId() : ENTITY_TYPE_NAME_ID_MAP.get(type.getName()); } diff --git a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/animations/AnimationRegistry.java b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/animations/AnimationRegistry.java index 4673e60..a4e6d91 100644 --- a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/animations/AnimationRegistry.java +++ b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/animations/AnimationRegistry.java @@ -83,7 +83,6 @@ public synchronized void reload() { this.stepCounter.set(0); // Register default animations - // TODO: Handle colors in frame data this.registerAnimation(new RainbowAnimation()); this.registerAnimation(new WaveAnimation()); this.registerAnimation(new BurnAnimation()); diff --git a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/hologram/line/DefaultHologramLine.java b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/hologram/line/DefaultHologramLine.java index f620cfb..9c50ac3 100644 --- a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/hologram/line/DefaultHologramLine.java +++ b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/hologram/line/DefaultHologramLine.java @@ -35,11 +35,6 @@ public class DefaultHologramLine implements HologramLine { - /* - * TODO: - * - Hover content for text lines - */ - private final @NotNull HologramPage parent; private final @NotNull HologramLineSettings settings; private final @NotNull PositionManager positionManager; diff --git a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/utils/pinger/PingerResponse.java b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/utils/pinger/PingerResponse.java index b121713..6c5c137 100644 --- a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/utils/pinger/PingerResponse.java +++ b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/utils/pinger/PingerResponse.java @@ -24,7 +24,10 @@ /** * This class stores data about a pinged server. + * + * @since 3.0.0 */ +@SuppressWarnings("unused") @Getter public class PingerResponse {