Skip to content

Commit

Permalink
Rename vars
Browse files Browse the repository at this point in the history
  • Loading branch information
voruti committed Jul 22, 2023
1 parent ff9658a commit a54e3e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ public EventTask onServerPing(final ProxyPingEvent event) {
final ServerPing.Builder ping = serverPing.asBuilder()
.clearSamplePlayers()
.samplePlayers(samplePlayers.toArray(new ServerPing.SamplePlayer[0]));
if (config.setMaxPlayers()) ping.maximumPlayers(this.server.getConfiguration().getShowMaxPlayers());
if (config.setOnlinePlayers()) ping.onlinePlayers(players.size());
if (config.replaceMaxPlayerCount()) ping.maximumPlayers(this.server.getConfiguration().getShowMaxPlayers());
if (config.replaceOnlinePlayerCount()) ping.onlinePlayers(players.size());
if (setVersion) ping.version(new ServerPing.Version(config.versionProtocol(), config.versionName()));
event.setPing(ping.build());
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/voruti/velocityplayerlistquery/model/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class Config {
public static final Config DEFAULT_CONFIG = new ConfigBuilder()
.serverListEntryFormat("%1$s")
.maxListEntries(16)
.setOnlinePlayers(false)
.setMaxPlayers(false)
.replaceOnlinePlayerCount(false)
.replaceMaxPlayerCount(false)
.setVersion(false)
.onlySetUnsetVersion(false)
.versionName("Unknown")
Expand All @@ -39,15 +39,15 @@ public class Config {
int maxListEntries;

/**
* Should the online players be replaced with Velocity players?
* Should the online player count be replaced with Velocity players?
* Useful when using <code>ping-passthrough = "all"</code>.
*/
boolean setOnlinePlayers;
boolean replaceOnlinePlayerCount;
/**
* Should the maximum player count be replaced with the Velocity configured amount?
* Useful when using <code>ping-passthrough = "all"</code>.
*/
boolean setMaxPlayers;
boolean replaceMaxPlayerCount;

/**
* Should version information be set?
Expand Down

0 comments on commit a54e3e4

Please sign in to comment.