Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
update release candidate 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdayy authored Dec 31, 2021
1 parent a954453 commit d1c0034
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2G
mod_name = Tabulous
mod_id = tabulous
mod_version = 0.1.0-pre9
mod_version = 0.1.0-rc1
10 changes: 5 additions & 5 deletions src/main/java/com/nxtdelivery/tabulous/Tabulous.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class Tabulous {
public static TabulousConfig config;
private static boolean isPatcher = false;
public static boolean isSkyblock = false;
public static boolean isTNT = false;
public static boolean hideWhiteNames = false;
public static boolean isBedWars = false;
private static final Set<String> skyblockInAllLanguages = Sets.newHashSet("SKYBLOCK", "\u7A7A\u5C9B\u751F\u5B58", "\u7A7A\u5CF6\u751F\u5B58");
private static final Minecraft mc = Minecraft.getMinecraft();
Expand Down Expand Up @@ -65,13 +65,13 @@ public void onWorldLoad(WorldEvent.Load event) {
if (!mc.isSingleplayer() && player.getClientBrand() != null) {
if (!player.getClientBrand().contains("Hypixel")) {
isSkyblock = false;
isTNT = false;
hideWhiteNames = false;
isBedWars = false;
return;
}
} else {
isSkyblock = false;
isTNT = false;
hideWhiteNames = false;
isBedWars = false;
return;
}
Expand All @@ -83,13 +83,13 @@ public void onWorldLoad(WorldEvent.Load event) {
for (String skyblock : skyblockInAllLanguages) {
isSkyblock = objectiveName.startsWith(skyblock);
}
isTNT = objectiveName.contains("TNT");
hideWhiteNames = objectiveName.contains("TNT") || objectiveName.contains("PVP RUN") || objectiveName.contains("BOW SPLEEF") || objectiveName.contains("PARTY GAMES");
isBedWars = objectiveName.contains("BED WARS");
return;
}
}
isSkyblock = false;
isTNT = false;
hideWhiteNames = false;
isBedWars = false;
},20);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ public class TabulousConfig extends Vigilant {
type = PropertyType.SELECTOR,
name = "Tab Position",
description = "Change where the tab is in your game.\n\u00a7eExperimental!",
category = "Tab", options = {"Top (Default)", "Top Left", "Top Right", "Left", "Bottom (bit broken)"}
category = "Tab", options = {"Top (Default)", "Top Left", "Top Right", "Left", "Bottom"}
)
public static int position = 0;

@Property(
type = PropertyType.SWITCH,
name = "Show Header",
description = "Show the header on the tab menu.",
description = "Show the header on the tab menu.\nYou might have to rejoin the server for it to update.",
category = "Tab", subcategory = "Headers/Footers"
)
public static boolean showHeader = true;

@Property(
type = PropertyType.SWITCH,
name = "Show Footer",
description = "Show the footer on the tab menu.",
description = "Show the footer on the tab menu.\nYou might have to rejoin the server for it to update.",
category = "Tab", subcategory = "Headers/Footers"
)
public static boolean showFooter = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public List<NetworkPlayerInfo> removeTabEntries(List<NetworkPlayerInfo> 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.isTNT) list.removeIf(info -> !getPlayerName(info).startsWith("\u00a7"));
if (!Tabulous.hideWhiteNames && inGame) list.removeIf(info -> !getPlayerName(info).startsWith("\u00a7"));
} catch (Exception ignored) {
}
}
Expand Down Expand Up @@ -371,6 +371,7 @@ private void modifyHeader() {
}
if (!TabulousConfig.showHeader) {
header = null;
headerList = null;
}
}

Expand Down

0 comments on commit d1c0034

Please sign in to comment.