Skip to content

Commit

Permalink
Change the default values and order of mod properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bytzo committed Apr 29, 2024
1 parent 0f521d0 commit af14397
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 35 deletions.
57 changes: 32 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,47 +33,54 @@ Sessility also allows you to configure whether or not sessile players are displa
## Configuration file

```properties
# The idle time in seconds before a player is considered sessile.
# Default: 120
sessile-timeout=300

# The message to broadcast when a player becomes sessile.
# Default: (empty)
message-sessile=%s became a sessile creature
# Detect player actions (attacking, using, etc.) as motility.
# Default: true
detect-action=true

# Whether or not to hide sessile players in the server player list.
# Detect some player advancement actions (such as jumping) as motility.
# (warning: may cause some false positives)
# Default: false
hide-sessile-in-server-list=false
detect-advancement-action=false

# The color of the sessile display name. This can either be a color name or a six-digit hex code.
# Default: gray
sessile-display-color=\#aaaaaa

# Whether or not to exclude sessile players from the player sleeping requirement.
# Detect player boat paddling as motility.
# Default: true
skip-sessile-in-sleep-count=true
detect-boat-paddle=true

# Whether or not to detect player advancement actions, such jumps, as motility.
# Default: true
detect-advancement-action=true

# Whether or not to detect player rotation as motility.
# Detect player rotation as motility.
# Default: true
detect-rotation=true

# Whether or not to detect player action (hitting, breaking blocks or moving) as motility.
# Default: true
detect-action=true
# Hide sessile players in the server player list.
# Default: false
hide-sessile-in-server-list=false

# Whether or not to hide sessile players in the player tab list.
# Hide sessile players in the player tab list.
# Default: false
hide-sessile-in-tab-list=false

# The message to broadcast when a player becomes motile (the opposite of sessile).
# (note: leave empty to disable motile messages)
# Default: (empty)
message-motile=%s returned from the depths

# Whether or not to skip sessile players in the server player count.
# The message to broadcast when a player becomes sessile.
# (note: leave empty to disable sessile messages)
# Default: (empty)
message-sessile=%s became a sessile creature

# The color of the sessile display name. This can be either a color name or a six-digit hex code.
# Default: gray
sessile-display-color=\#aaaaaa

# The idle time (in seconds) before a player is considered sessile.
# Default: 240
sessile-timeout=720

# Exclude sessile players from the server player count.
# Default: false
skip-sessile-in-player-count=false

# Exclude sessile players from the player sleeping requirement.
# Default: true
skip-sessile-in-sleep-count=true
```
20 changes: 10 additions & 10 deletions src/main/java/net/bytzo/sessility/SessilityProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
import net.minecraft.server.dedicated.Settings;

public class SessilityProperties extends Settings<SessilityProperties> {
public final int sessileTimeout = this.get("sessile-timeout", 120);
public final boolean detectAction = this.get("detect-action", true);
public final boolean detectAdvancementAction = this.get("detect-advancement-action", false);
public final boolean detectBoatPaddle = this.get("detect-boat-paddle", true);
public final boolean detectRotation = this.get("detect-rotation", true);
public final boolean hideSessileInServerList = this.get("hide-sessile-in-server-list", false);
public final boolean hideSessileInTabList = this.get("hide-sessile-in-tab-list", false);
public final String messageMotile = this.get("message-motile", "");
public final String messageSessile = this.get("message-sessile", "");
public final TextColor sessileDisplayColor = this.get("sessile-display-color",
color -> TextColor.parseColor(color).getOrThrow(),
TextColor::serialize, TextColor.fromLegacyFormat(ChatFormatting.GRAY));
public final String messageSessile = this.get("message-sessile", "");
public final String messageMotile = this.get("message-motile", "");
public final boolean skipSessileInSleepCount = this.get("skip-sessile-in-sleep-count", true);
public final int sessileTimeout = this.get("sessile-timeout", 240);
public final boolean skipSessileInPlayerCount = this.get("skip-sessile-in-player-count", false);
public final boolean hideSessileInTabList = this.get("hide-sessile-in-tab-list", false);
public final boolean hideSessileInServerList = this.get("hide-sessile-in-server-list", false);
public final boolean detectAdvancementAction = this.get("detect-advancement-action", true);
public final boolean detectRotation = this.get("detect-rotation", true);
public final boolean detectAction = this.get("detect-action", true);
public final boolean detectBoatPaddle = this.get("detect-boat-paddle", true);
public final boolean skipSessileInSleepCount = this.get("skip-sessile-in-sleep-count", true);

public SessilityProperties(Properties properties) {
super(properties);
Expand Down

0 comments on commit af14397

Please sign in to comment.