This commit is contained in:
RayzsYT committed 2024-06-17 03:09:21 +02:00
1 parent 6a5acfebf0
commit e35e494c55
2 files changed
+25 -4

No files matched your search

@@ -6,7 +6,7 @@ import de.rayzs.pat.utils.configuration.helper.ConfigSectionHelper;
public class CustomProtocolPingSection extends ConfigStorage {
public boolean ENABLED, ALWAYS_SHOW;
public boolean ENABLED, ALWAYS_SHOW, HIDE_PLAYERS;
public String PROTOCOL;
public CustomProtocolPingSection() {
@@ -16,9 +16,10 @@ public class CustomProtocolPingSection extends ConfigStorage {
@Override
public void load() {
super.load();
if(!Reflection.isProxyServer()) return;
ENABLED = new ConfigSectionHelper<Boolean>(this, "enabled", true).getOrSet();
ALWAYS_SHOW = new ConfigSectionHelper<Boolean>(this, "always-show", true).getOrSet();
ENABLED = new ConfigSectionHelper<Boolean>(this, "enabled", Reflection.isProxyServer() || Reflection.isPaper()).getOrSet();
ALWAYS_SHOW = new ConfigSectionHelper<Boolean>(this, "always-show", Reflection.isProxyServer() || Reflection.isPaper()).getOrSet();
PROTOCOL = new ConfigSectionHelper<String>(this, "protocol", "&f&lProAntiTab &7(&a%online%&7/&c%max%&7)").getOrSet();
if(!Reflection.isProxyServer()) return;
HIDE_PLAYERS = new ConfigSectionHelper<Boolean>(this, "hide-players", true).getOrSet();
}
}
@@ -38,6 +38,26 @@ handle-through-proxy:
# Enabling this will disable ALL commands except for those that are in the (group-)list.
turn-blacklist-to-whitelist: true
# Change the protocol for the version name when the server is being pinged
# (!) Warning: It's required to use Paper or Purpur to use this feature!
# (!) Warning: For following server version: 1.12.2 - latest
custom-protocol-ping:
enabled: true
# Normally it would only display when someone pings the server with the wrong version.
# Enabling this will always display the protocol and replace it with the normal player count.
always-show: true
# Enabling this option hides the list of players on your server,
# when you hover over the player count.
hide-players: true
# The displayed protocol message
# Available placeholders:
# %online% - current online player count
# %max% - max player count
protocol: '&f&lProAntiTab &7(&a%online%&7/&c%max%&7)'
#>> HTP (Sync)
# This feature allows you to create your own 'Unknown command.' message.
# It is very helpful considering the fact you might have to set the same message