Skip to content

Builder

Builder class to create a new ProfileEntry instance.

Constructor Summary

Constructor Description
Builder() Empty Builder Constructor used to create a new instance of this class.

Method Summary

Modifier and Type Method Description
Builder extraPlayersCount(Integer) Sets the number of players to add to the online players to use as the new max players value.
Builder extraPlayersEnabled(NullBool) Sets whether the extra players feature should be enabled or not.
Builder favicon(String) Sets the value to use for the favicon.
Builder hidePlayersEnabled(NullBool) Sets whether the player count should be hidden or not.
Builder maxPlayersCount(Integer) Sets the number of max players allowed to join this server.
Builder maxPlayersEnabled(NullBool) Sets whether the max players feature should be enabled.
Builder motd(List<String>) Sets a new MOTD to use.
Builder playerCountText(String) Sets the text to override the player count with.
Builder players(List<String>) Sets the players (lines) to use for the hover.
ProfileEntry build() Creates a new ProfileEntry instance with the values set in this Builder.
Builder setExtraPlayerCount(Integer)
Typo in the name. Use setExtraPlayersCount(Integer) instead.
Builder setExtraPlayersCount(Integer)
Method renamed to fit ProfileEntry record more closely. Use extraPlayersCount(Integer) instead.
Builder setExtraPlayersEnabled(NullBool)
Method renamed to fit ProfileEntry record more closely. Use extraPlayersEnabled(NullBool) instead.
Builder setFavicon(String)
Method renamed to fit ProfileEntry record more closely. Use favicon(String) instead.
Builder setHidePlayersEnabled(NullBool)
Method renamed to fit ProfileEntry record more closely. Use hidePlayersEnabled(NullBool) instead.
Builder setMaxPlayersCount(Integer)
Method renamed to fit ProfileEntry record more closely. Use maxPlayersCount(Integer) instead.
Builder setMaxPlayersEnabled(NullBool)
Method renamed to fit ProfileEntry record more closely. Use maxPlayersEnabled(NullBool) instead.
Builder setMotd(List<String>)
Method renamed to fit ProfileEntry record more closely. Use motd(String) instead.
Builder setPlayerCountText(String)
Method renamed to fit ProfileEntry record more closely. Use playerCountText(String) instead.
Builder setPlayers(List<String>)
Method renamed to fit ProfileEntry record more closely. Use players(List<String>) instead.

Constructor Detail

Builder()

Empty Builder Constructor used to create a new instance of this class.

Method Detail

Builder extraPlayersCount(Integer)

Sets the number of players to add to the online players to use as the new max players value.
This option has no effect when extraPlayersEnabled is set to NullBool.FALSE or NullBool.NOT_SET.

Set this to null to not alter the max player count. Alternatively, set setExtraPlayersEnabled(NullBool) to NullBool.FALSE.

Parameters:

  • Integer: extraPlayersCount - The number of extra players to add.

Returns:

This Builder after the extra player count has been set. Useful for chaining.

Builder extraPlayersEnabled(NullBool)

Sets whether the extra players feature should be enabled or not.

Set to NullBool.NOT_SET to not set this.

Parameters:

  • NullBool: extraPlayersEnabled - Whether the extra players feature should be enabled or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder favicon(String)

Sets the value to use for the favicon.
The following values are supported:

  • URL to a valid PNG file.
  • File name (with .png extension) matching a file saved in the favicons folder of AdvancedServerList.
  • ${player uuid} to display the avatar of the player.
Set to an empty String or null to not alter the Favicon.

Parameters:

  • String: favicon - The favicon to set.

Returns:

This Builder after the Favicon has been set. Useful for chaining.

Builder hidePlayersEnabled(NullBool)

Sets whether the player count should be hidden or not.

Set to NullBool.NOT_SET to not set this.

Parameters:

  • NullBool: hidePlayersEnabled - Whether the player count should be hidden or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder maxPlayersCount(Integer)

Sets the number of max players allowed to join this server.
This option has no effect when maxPlayersEnabled is set to NullBool.FALSE or NullBool.NOT_SET.

Set this to null to not alter the max player count. Alternatively disable max Players.

Parameters:

  • Integer: maxPlayersCount - The number of max players to set.

Returns:

This Builder after the max player count has been set. Useful for chaining.

Builder maxPlayersEnabled(NullBool)

Sets whether the max players feature should be enabled.

Set to NullBool.NOT_SET to not set this.

An IllegalArgumentException may be thrown by the CheckUtil should maxPlayersEnabled be null.

Parameters:

  • NullBool: maxPlayersEnabled - Whether the extra players feature should be enabled or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder motd(List<String>)

Sets a new MOTD to use.

Set to an empty list to not change the MOTD.
Only the first two entries of the list will be considered and any additional ones discarded.

An IllegalArgumentException may be thrown by the CheckUtil should the provided motd list be null.

Parameters:

  • List<String>: motd - The MOTD to use.

Returns:

This Builder after the motd has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder playerCountText(String)

Sets the text to override the player count with.

Set to an empty String or null to not alter the player count text.

Parameters:

  • String: playerCountText - The text to show in the player count.

Returns:

This Builder after the player count text has been set. Useful for chaining.

Builder players(List<String>)

Sets the players (lines) to use for the hover.

Set to an empty list to not change the hover text.
An IllegalArgumentException may be thrown by the CheckUtil should the provided okayersmotd list be null.

Parameters:

  • List<String>: players - The lines to set for the hover.

Returns:

This Builder after the players have been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

ProfileEntry build()

Creates a new ProfileEntry instance with the values set in this Builder.

Returns:

New ProfileEntry instance.

Builder setExtraPlayerCount(Integer)

Deprecation Warning

Typo in the name. Use setExtraPlayersCount(Integer) instead.

Sets the number of players to add to the online players to use as the new max players value.
This option has no effect when extraPlayersEnabled is set to NullBool.FALSE or NullBool.NOT_SET.

Set this to null to not alter the max player count. Alternatively, set setExtraPlayersEnabled(NullBool) to NullBool.FALSE.

Parameters:

  • Integer: extraPlayersCount - The number of extra players to add.

Returns:

This Builder after the extra player count has been set. Useful for chaining.

Builder setExtraPlayersCount(Integer)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use extraPlayersCount(Integer) instead.

Sets the number of players to add to the online players to use as the new max players value.
This option has no effect when extraPlayersEnabled is set to NullBool.FALSE or NullBool.NOT_SET.

Set this to null to not alter the max player count. Alternatively, set setExtraPlayersEnabled(NullBool) to NullBool.FALSE.

Parameters:

  • Integer: extraPlayersCount - The number of extra players to add.

Returns:

This Builder after the extra player count has been set. Useful for chaining.

Builder setExtraPlayersEnabled(NullBool)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use extraPlayersEnabled(NullBool) instead.

Sets whether the extra players feature should be enabled or not.

Set to NullBool.NOT_SET to not set this.

Parameters:

  • NullBool: extraPlayersEnabled - Whether the extra players feature should be enabled or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder setFavicon(String)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use favicon(String) instead.

Sets the value to use for the favicon.
The following values are supported:

  • URL to a valid PNG file.
  • File name (with .png extension) matching a file saved in the favicons folder of AdvancedServerList.
  • ${player uuid} to display the avatar of the player.

Parameters:

  • String: favicon - The favicon to set

Returns:

This Builder after the favicon has been set. Useful for chaining.

Builder setHidePlayersEnabled(NullBool)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use hidePlayersEnabled(NullBool) instead.

Sets whether the player count should be hidden or not.

Set to NullBool.NOT_SET to not set this.

Parameters:

  • NullBool: hidePlayersEnabled - Whether the player count should be hidden or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder setMaxPlayersCount(Integer)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use maxPlayersCount(Integer) instead.

Sets the number of max players allowed to join this server.
This option has no effect when maxPlayersEnabled is set to NullBool.FALSE or NullBool.NOT_SET.

Set this to null to not alter the max player count. Alternatively, set setMaxPlayersEnabled(NullBool) to NullBool.FALSE.

Parameters:

  • Integer: maxPlayersCount - The number of max players to set.

Returns:

This Builder after the extra player count has been set. Useful for chaining.

Builder setMaxPlayersEnabled(NullBool)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use maxPlayersEnabled(NullBool) instead.

Sets whether the max players feature should be enabled.

Set to NullBool.NOT_SET to not set this.

Parameters:

  • NullBool: maxPlayersEnabled - Whether the extra players feature should be enabled or not.

Returns:

This Builder after the NullBool has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder setMotd(List<String>)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use motd(String) instead.

Sets a new MOTD to use.

Set to an empty list to not change the MOTD.
Only the first two entries of the list will be considered and any additional ones discarded.

Parameters:

  • List<String>: motd - The MOTD to use.

Returns:

This Builder after the motd has been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.

Builder setPlayerCountText(String)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use playerCountText(String) instead.

Sets the text to override the player count with.

Set to an empty String or null to not alter the player count text.

Parameters:

  • String: playerCountText - The text to show in the player count.

Returns:

This Builder after the player count text has been set. Useful for chaining.

Builder setPlayers(List<String>)

Deprecation Warning

Method renamed to fit ProfileEntry record more closely. Use players(List<String>) instead.

Sets the players (lines) to use for the hover.

Set to an empty list to not change the hover text.

Parameters:

  • List<String>: players - The lines to set for the hover.

Returns:

This Builder after the players have been set. Useful for chaining.

Throws:

  • IllegalArgumentException - Thrown by the CheckUtil in case null has been provided as parameter.