Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/main/java/serverutils/ServerUtilitiesConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class ServerUtilitiesConfig {
public static final Mixins mixins = new Mixins();
public static final MOTD motd = new MOTD();
public static final Transfer transfer = new Transfer();
public static final Tab tab = new Tab();

public static class General {

Expand Down Expand Up @@ -781,6 +782,10 @@ public static class Mixins {
@Config.Comment("Enable grief protection for farmland trampling.")
@Config.DefaultBoolean(true)
public boolean farmlandTramplingProtection;

@Config.Comment("Replaces the vanilla player list (TAB overlay) with a modern-style tab list featuring player heads, dynamic columns, and header/footer support.")
@Config.DefaultBoolean(true)
public boolean modernTabOverlay;
}

public static class MOTD {
Expand Down Expand Up @@ -811,4 +816,32 @@ public static class Transfer {
@Config.DefaultStringList({})
public String[] whitelist;
}

public static class Tab {

@Config.Comment("Show player head icons in the modern tab overlay.")
@Config.DefaultBoolean(true)
@Config.Sync
public boolean showPlayerHeads;

@Config.Comment("Show numeric ping value (e.g. 42ms) next to the signal bars.")
@Config.DefaultBoolean(true)
@Config.Sync
public boolean showPingNumber;

@Config.Comment("Show signal bars in the modern tab overlay.")
@Config.DefaultBoolean(true)
@Config.Sync
public boolean showPingBars;

@Config.Comment("Header text for the modern tab overlay. Use & for color/format codes, \\n for line breaks. Overridden by proxy plugin channel.")
@Config.DefaultString("&b&lGTNH Server\\n&7A modern tab list for 1.7.10")
@Config.Sync
public String headerText;

@Config.Comment("Footer text for the modern tab overlay. Use & for color/format codes, \\n for line breaks. Overridden by proxy plugin channel.")
@Config.DefaultString("&7Ping: &a< 150ms &e< 300ms &c< 600ms &4< 1000ms &8>= 1000ms\\n&8Powered by &dServerUtilities")
@Config.Sync
public String footerText;
}
}
7 changes: 7 additions & 0 deletions src/main/java/serverutils/client/ServerUtilitiesClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import serverutils.ServerUtilitiesConfig;
import serverutils.client.gui.BuiltinChunkMap;
import serverutils.client.gui.SidebarButtonManager;
import serverutils.client.tab.TabChannelHandler;
import serverutils.client.tab.TabDisplayHandler;
import serverutils.command.client.CommandClientConfig;
import serverutils.command.client.CommandKaomoji;
import serverutils.command.client.CommandPing;
Expand Down Expand Up @@ -80,6 +82,11 @@ public void postInit(FMLPostInitializationEvent event) {
NavigatorIntegration.init();
}

if (ServerUtilitiesConfig.mixins.modernTabOverlay) {
TabChannelHandler.INSTANCE.registerChannel();
TabDisplayHandler.INSTANCE.registerChannel();
}

if (Loader.isModLoaded("FTBU") || Loader.isModLoaded("FTBL")) {
throw new IncompatibleModException();
}
Expand Down
Loading