From 88eceab4806863355de270ad2be0c68f5d2e0a3f Mon Sep 17 00:00:00 2001 From: Video Date: Wed, 16 Nov 2022 03:01:51 -0700 Subject: [PATCH] Codacy is incredibly picky and I hope it burns in hell --- .../bridge/CoreProtectBridge.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java index 7b6f1454..f5ba0c7a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java @@ -15,7 +15,6 @@ import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextColor; import net.kyori.adventure.text.format.TextDecoration; -import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Player; @@ -169,8 +168,6 @@ public class CoreProtectBridge extends FreedomService public void showPageToPlayer(Player player, FUtil.PaginationList results, int pageNum) { - // No funny business allowed here - pageNum = Math.abs(pageNum); if (player == null || !player.isOnline()) { return; @@ -219,17 +216,11 @@ public class CoreProtectBridge extends FreedomService // Do nothing (shuts Codacy up) } } - line.append(symbol); - - // Player - line.append(Component.text(entry.getPlayer()).color(TextColor.color(0x30ade4))); - - // Action, Part 2 - line.append(action.color(NamedTextColor.WHITE)); - - // Block - line.append(Component.text(entry.getBlockData().getMaterial().name().toLowerCase()) - .color(TextColor.color(0x30ade4))); + // Symbol, player, action, block + line.append(symbol).append(Component.text(entry.getPlayer()).color(TextColor.color(0x30ade4))) + .append(action.color(NamedTextColor.WHITE)).append( + Component.text(entry.getBlockData().getMaterial().name().toLowerCase()) + .color(TextColor.color(0x30ade4))); // Rolled back? if (entry.isRolledBack())