From b56c63c946a276ff28df3c75dc16643ba66463ec Mon Sep 17 00:00:00 2001 From: Daniel Norris Date: Mon, 15 Jul 2024 14:43:29 +0100 Subject: [PATCH] fix(forge20): update API usage --- .../reforged/bingo/forge/command/BingoCardCommand.java | 2 +- .../reforged/bingo/forge/command/CompleteSlotCommand.java | 2 +- .../envyful/reforged/bingo/forge/command/ReRollCommand.java | 2 +- .../reforged/bingo/forge/listener/PokemonCatchListener.java | 4 ++-- .../com/envyful/reforged/bingo/forge/task/CardResetTask.java | 2 +- .../java/com/envyful/reforged/bingo/forge/ui/BingoCardUI.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/BingoCardCommand.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/BingoCardCommand.java index 4958c43..55cde89 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/BingoCardCommand.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/BingoCardCommand.java @@ -35,7 +35,7 @@ public void run(@Sender ServerPlayer player, String[] args) { } BingoCardUI.open(sender); - BingoAttribute attribute = sender.getAttribute(BingoAttribute.class); + BingoAttribute attribute = sender.getAttributeNow(BingoAttribute.class); sender.message(UtilChatColour.colour( ReforgedBingo.getInstance().getLocale().getRemainingTimeMessage() diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/CompleteSlotCommand.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/CompleteSlotCommand.java index f8cdb93..e4a4678 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/CompleteSlotCommand.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/CompleteSlotCommand.java @@ -31,7 +31,7 @@ public void onCommand(@Sender CommandSource sender, return; } - BingoAttribute attribute = targetPlayer.getAttribute(BingoAttribute.class); + BingoAttribute attribute = targetPlayer.getAttributeNow(BingoAttribute.class); if (attribute == null) { return; diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/ReRollCommand.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/ReRollCommand.java index c21c501..f25b616 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/ReRollCommand.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/command/ReRollCommand.java @@ -29,7 +29,7 @@ public void onCommand(@Sender CommandSource sender, return; } - BingoAttribute attribute = targetPlayer.getAttribute(BingoAttribute.class); + BingoAttribute attribute = targetPlayer.getAttributeNow(BingoAttribute.class); if (attribute == null) { return; diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/listener/PokemonCatchListener.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/listener/PokemonCatchListener.java index 75402a4..b092171 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/listener/PokemonCatchListener.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/listener/PokemonCatchListener.java @@ -26,7 +26,7 @@ public void onBingoSlotComplete(CaptureEvent.SuccessfulCapture event) { return; } - BingoAttribute attribute = player.getAttribute(BingoAttribute.class); + BingoAttribute attribute = player.getAttributeNow(BingoAttribute.class); if (attribute == null) { return; @@ -43,7 +43,7 @@ public void onRaidDenCapture(CaptureEvent.SuccessfulRaidCapture event) { return; } - BingoAttribute attribute = player.getAttribute(BingoAttribute.class); + BingoAttribute attribute = player.getAttributeNow(BingoAttribute.class); if (attribute == null) { return; diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/task/CardResetTask.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/task/CardResetTask.java index a034f01..82f2e41 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/task/CardResetTask.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/task/CardResetTask.java @@ -23,7 +23,7 @@ public void run() { continue; } - BingoAttribute bingoAttribute = envyPlayer.getAttribute(BingoAttribute.class); + BingoAttribute bingoAttribute = envyPlayer.getAttributeNow(BingoAttribute.class); if (bingoAttribute == null) { continue; diff --git a/forge20/src/main/java/com/envyful/reforged/bingo/forge/ui/BingoCardUI.java b/forge20/src/main/java/com/envyful/reforged/bingo/forge/ui/BingoCardUI.java index 2e5c2cb..f19a1c6 100644 --- a/forge20/src/main/java/com/envyful/reforged/bingo/forge/ui/BingoCardUI.java +++ b/forge20/src/main/java/com/envyful/reforged/bingo/forge/ui/BingoCardUI.java @@ -25,7 +25,7 @@ public static void open(EnvyPlayer player) { .width(9) .build(); - BingoAttribute attribute = player.getAttribute(BingoAttribute.class); + BingoAttribute attribute = player.getAttributeNow(BingoAttribute.class); UtilConfigInterface.fillBackground(pane, config.getConfigInterface());