From 79308fc40fb43972d0d30c5f0ea11676f4d838df Mon Sep 17 00:00:00 2001 From: HSGamer Date: Thu, 7 Mar 2024 20:37:56 +0700 Subject: [PATCH] Annotated Button --- .../hscore/minecraft/gui/button/impl/AnimatedButton.java | 2 +- .../me/hsgamer/hscore/minecraft/gui/button/impl/ListButton.java | 2 +- .../hscore/minecraft/gui/button/impl/PredicateButton.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/AnimatedButton.java b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/AnimatedButton.java index b7d092cd76..79e49fae45 100644 --- a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/AnimatedButton.java +++ b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/AnimatedButton.java @@ -94,7 +94,7 @@ public Item getItem(@NotNull UUID uuid) { } @Override - public void handleAction(ClickEvent event) { + public void handleAction(@NotNull ClickEvent event) { buttons.get(getCurrentIndex(event.getViewerID())).handleAction(event); } diff --git a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/ListButton.java b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/ListButton.java index 3d5ed2d989..7a66430137 100644 --- a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/ListButton.java +++ b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/ListButton.java @@ -102,7 +102,7 @@ public Item getItem(@NotNull UUID uuid) { } @Override - public void handleAction(ClickEvent event) { + public void handleAction(@NotNull ClickEvent event) { Optional.ofNullable(currentIndexMap.get(event.getViewerID())) .map(buttons::get) .ifPresent(button -> button.handleAction(event)); diff --git a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/PredicateButton.java b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/PredicateButton.java index 8086b0546c..d235611b2c 100644 --- a/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/PredicateButton.java +++ b/hscore-minecraft/hscore-minecraft-gui-button/src/main/java/me/hsgamer/hscore/minecraft/gui/button/impl/PredicateButton.java @@ -134,7 +134,7 @@ public Item getItem(@NotNull UUID uuid) { } @Override - public void handleAction(ClickEvent event) { + public void handleAction(@NotNull ClickEvent event) { UUID uuid = event.getViewerID(); if (failToViewList.contains(uuid)) { fallbackButton.handleAction(event);