diff --git a/src/main/java/com/nxtdelivery/tabulous/Tabulous.java b/src/main/java/com/nxtdelivery/tabulous/Tabulous.java index 9f1bc5e..3693506 100644 --- a/src/main/java/com/nxtdelivery/tabulous/Tabulous.java +++ b/src/main/java/com/nxtdelivery/tabulous/Tabulous.java @@ -91,7 +91,7 @@ public void onWorldLoad(WorldEvent.Load event) { isSkyblock = false; hideWhiteNames = false; isBedWars = false; - },20); + }, 20); } diff --git a/src/main/java/com/nxtdelivery/tabulous/command/TabulousCommand.java b/src/main/java/com/nxtdelivery/tabulous/command/TabulousCommand.java index c63b6ab..f286635 100644 --- a/src/main/java/com/nxtdelivery/tabulous/command/TabulousCommand.java +++ b/src/main/java/com/nxtdelivery/tabulous/command/TabulousCommand.java @@ -1,9 +1,9 @@ package com.nxtdelivery.tabulous.command; +import com.nxtdelivery.tabulous.Tabulous; import gg.essential.api.EssentialAPI; import gg.essential.api.commands.Command; import gg.essential.api.commands.DefaultHandler; -import com.nxtdelivery.tabulous.Tabulous; public class TabulousCommand extends Command { public TabulousCommand() { diff --git a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameForgeMixin.java b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameForgeMixin.java index b513109..08737e2 100644 --- a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameForgeMixin.java +++ b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameForgeMixin.java @@ -9,7 +9,7 @@ @Mixin(GuiIngameForge.class) public class GuiIngameForgeMixin { - @ModifyArg(method = "renderPlayerList", at = @At(value = "INVOKE",target = "Lnet/minecraft/client/gui/GuiPlayerTabOverlay;renderPlayerlist(ILnet/minecraft/scoreboard/Scoreboard;Lnet/minecraft/scoreboard/ScoreObjective;)V"),index = 0) + @ModifyArg(method = "renderPlayerList", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiPlayerTabOverlay;renderPlayerlist(ILnet/minecraft/scoreboard/Scoreboard;Lnet/minecraft/scoreboard/ScoreObjective;)V"), index = 0) public int setWidth(int width) { switch (TabulousConfig.position) { default: diff --git a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameMixin.java b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameMixin.java index c84081f..98fc05f 100644 --- a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameMixin.java +++ b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiIngameMixin.java @@ -13,8 +13,8 @@ public class GuiIngameMixin { @Inject(method = "renderBossHealth", at = @At("HEAD"), cancellable = true) public void cancelBossBar(CallbackInfo ci) { - if(Minecraft.getMinecraft().gameSettings.keyBindPlayerList.isKeyDown()) { - if(TabulousConfig.cancelBossbar) { + if (Minecraft.getMinecraft().gameSettings.keyBindPlayerList.isKeyDown()) { + if (TabulousConfig.cancelBossbar) { ci.cancel(); } } diff --git a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiMixin.java b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiMixin.java index cacb93b..d30e4be 100644 --- a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiMixin.java +++ b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiMixin.java @@ -10,7 +10,7 @@ public class GuiMixin { @Inject(method = "drawRect", at = @At("HEAD"), cancellable = true) private static void cancelDrawRect(int left, int top, int right, int bottom, int color, CallbackInfo ci) { - if ((float)(color >> 24 & 255) == 0) { + if ((float) (color >> 24 & 255) == 0) { ci.cancel(); } } diff --git a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiPlayerTabOverlayMixin.java b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiPlayerTabOverlayMixin.java index 3584169..c54d269 100644 --- a/src/main/java/com/nxtdelivery/tabulous/mixin/GuiPlayerTabOverlayMixin.java +++ b/src/main/java/com/nxtdelivery/tabulous/mixin/GuiPlayerTabOverlayMixin.java @@ -83,7 +83,8 @@ public List removeTabEntries(List list) { if (TabulousConfig.hideNPCs && EssentialAPI.getMinecraftUtil().isHypixel()) { try { list.removeIf(info -> getPlayerName(info).startsWith("\u00A78[NPC]") || getPlayerName(info).startsWith("\u00a7e[NPC]") || getPlayerName(info).startsWith("\u00a75[NPC]")); - if (!Tabulous.hideWhiteNames && inGame) list.removeIf(info -> !getPlayerName(info).startsWith("\u00a7")); + if (!Tabulous.hideWhiteNames && inGame) + list.removeIf(info -> !getPlayerName(info).startsWith("\u00a7")); } catch (Exception ignored) { } } @@ -234,10 +235,10 @@ public void renderNames(Args args) { if (name.startsWith("[")) { name = name.substring(name.indexOf("]") + 2); } - if(!Character.isLetterOrDigit(args.get(0).toString().charAt(2))) { + if (!Character.isLetterOrDigit(args.get(0).toString().charAt(2))) { name = args.get(0).toString().substring(0, 10) + name; args.set(0, name); - } else args.set(0,TabulousConfig.myNameText); + } else args.set(0, TabulousConfig.myNameText); } else if (!TabulousConfig.hideCustomNameIngame) args.set(0, TabulousConfig.myNameText); else if (!inGame) args.set(0, TabulousConfig.myNameText); diff --git a/src/main/java/com/nxtdelivery/tabulous/util/DownloadGui.java b/src/main/java/com/nxtdelivery/tabulous/util/DownloadGui.java index 475cf9c..da6a4ba 100644 --- a/src/main/java/com/nxtdelivery/tabulous/util/DownloadGui.java +++ b/src/main/java/com/nxtdelivery/tabulous/util/DownloadGui.java @@ -1,11 +1,11 @@ package com.nxtdelivery.tabulous.util; +import com.nxtdelivery.tabulous.Tabulous; import gg.essential.api.EssentialAPI; import gg.essential.api.gui.ConfirmationModalBuilder; import gg.essential.api.utils.Multithreading; import gg.essential.elementa.WindowScreen; import kotlin.Unit; -import com.nxtdelivery.tabulous.Tabulous; import java.io.File; diff --git a/src/main/java/com/nxtdelivery/tabulous/util/Updater.java b/src/main/java/com/nxtdelivery/tabulous/util/Updater.java index fef88fc..94aeb02 100644 --- a/src/main/java/com/nxtdelivery/tabulous/util/Updater.java +++ b/src/main/java/com/nxtdelivery/tabulous/util/Updater.java @@ -1,6 +1,8 @@ package com.nxtdelivery.tabulous.util; import com.google.gson.JsonObject; +import com.nxtdelivery.tabulous.Tabulous; +import com.nxtdelivery.tabulous.config.TabulousConfig; import gg.essential.api.EssentialAPI; import gg.essential.api.utils.Multithreading; import gg.essential.api.utils.WebUtil; @@ -9,8 +11,6 @@ import net.minecraft.client.Minecraft; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; import org.apache.commons.lang3.StringUtils; -import com.nxtdelivery.tabulous.Tabulous; -import com.nxtdelivery.tabulous.config.TabulousConfig; import java.io.File; import java.io.IOException;