Giter Club home page Giter Club logo

sessility's Introduction

Sessility

Sessility is a Minecraft Fabric utility mod that keeps track of sessile creatures, more often known as "AFK players".

sessile

adjective

  1. (of an organism) permanently rooted in place; lacking mobility
  2. (of a plant) attached without a stalk

Feature summary

  • Change the color of sessile players in the player tab list
  • Exclude sessile players from the player sleeping requirement
  • Configure the amount of idle time before a player is considered sessile
  • Broadcast a chat message when a player becomes either sessile or motile
  • Hide sessile players in the player tab list, server player list, or server player count
  • Choose if action advancements or player rotation should be used to determine motility

By default, any player idling for more than 120 seconds is considered sessile. Sessile players are given a distinct color in the player tab overlay to distinguish them from other players. The sessile idle time and tab display color are both configurable.

You can also configure custom messages when a player changes their sessility. These messages are disabled by default and will only display if a configured message is present.

Sessility also allows you to configure whether or not sessile players are displayed in the server player list (shown above), the server player count, and the player tab list. Each one of these properties can be toggled individually.

Configuration file

# Detect player actions (attacking, using, etc.) as motility.
# Default: true
detect-action=true

# Detect some player advancement actions (such as jumping) as motility.
# (warning: may cause some false positives)
# Default: false
detect-advancement-action=false

# Detect player boat paddling as motility.
# Default: true
detect-boat-paddle=true

# Detect player rotation as motility.
# Default: true
detect-rotation=true

# Hide sessile players in the server player list.
# Default: false
hide-sessile-in-server-list=false

# 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

# 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

sessility's People

Contributors

bytzo avatar donington avatar nikitacartes avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

sessility's Issues

Player is still considered afk when moving around

Hi, I have been playing around with the mod and realized that when a player is AFK they can freely jump and walk around while still labeled as AFK. The motile message is triggered when the player has either: crouched, sprinted, attacked, right clicked, put items in their offhand, and moved or dropped items in the inventory.

Chat announcement

Is it possible to change the colour and font of the text that announces when a player goes sessile and when they become motile, Its the same colour as when a player leaves and joins and I wish to be able to make it grey and italic.

Player is considered AFK when riding a boat

It seems like the mod thinks a player becomes AFK when riding a boat for some time. This only happens when the player isn't doing anything else besides riding the boat (e.g. left/right clicking).

Vanilla Tweaks Name Colors not restored when player becomes motile

Hello there!

My name's Tikkle, or Tik, and I'd like to request that the last team the player is on be stored when the player goes AFK. That way when they un-AFK it returns them to the previous team.

I ask this because VanillaTweaks' datapack "Colors" uses Minecraft Teams to allow players to choose a custom color for their username that displays in chat and on the tab-list.

Thanks,
Tik

EDIT: It seems to restore "colors" team the player was on if the player is OP'd.

UTF-8 characters not supported in Sessility's configuration file

what encoding(?) does it use?
it seems other languages and special characters are not supported at all
it auto fixes(?) the text in the file into some weird codes
can you make it compatible with korean?
does not really care about special characters but would be awesome to support korean
btw love the mod~

[Bug?] Lack of Config file?

There does not seem to be a config file generated when the mod is installed and the game launched.
Used sessility-0.3 in 1.20.1

And if we need to simply make one ourselves, how does it have to be named? Does it need to be a .txt, .json, .conf, something else?
I'm very confused.

Feat: Adding Sessile Time Statistic

Hey, I would like to propose a sessile time scoreboard stat, this would allow for better play time statistics by making a remainder of the minecraft:custom:play_time stat with the sessile time

I tried implementing this myself but I really struggled with no FAPI and the official mojang mappings since I'm really new to minecraft mod development

This is an example of what that might look like in the actual code

PlayerMixin.java

@Inject(method = "tick", at = @At("HEAD"))
private void awardSessileStat(CallbackInfo ci) {
    var player = (Player) (Object) this;
    if (((SessilePlayer) player).isSessile()) player.awardStat(SessilityStats.SESSILE_TIME);
}

The only missing thing would be to register the statistic in the registry which may be done with something like

Registry.register(BuiltInRegistries.CUSTOM_STAT, "sessile_time", SessilityStats.SESSILE_TIME);
Stats.CUSTOM.get(SessilityStats.SESSILE_TIME, StatFormatter.TIME);

I ran into an issue while doing that though since I'm lost on where it is a good place to call the registration, an exception was thrown Registry is already frozen and I was unable to continue from there

Hopefully you all think this would be a valuable feature to have and find some extra time to implement! If you offer guidance I can also volunteer :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.