A server-side Fabric mod for Minecraft 1.21.1 that gives every player an engagement score, shown next to their name in chat. Players earn points by chatting and playing; the server owner decides what loses points and what happens at certain scores. Only the server needs it: vanilla clients can join.
Features
- Score tag: a colored
[100]prefix on each player's name in chat, join and death messages. Red belowlowTier, yellow in between, green fromhighTier. Scores are saved with the world. - Earning points:
chatPointsfor chatting (at most once perchatCooldownSeconds),playtimePointsperplaytimeMinutesof active play. Players idle forafkSecondsearn nothing. - Chat filter:
blockedWords(whole words),blockedPhrases(word sequences) andblockedPatterns(Java regex, case-insensitive). Catches leetspeak (d4mn), spacing (d a m n), stretched letters (daaamn) and punctuation.filterMode:allow(penalty only),censor(stars) orblock(message not sent). CostsfilterPenaltypoints. - Negative actions: each entry in
actionshasenabled,pointsandcooldownSeconds:player_kill: killing another player (on, 25)chat_spam: more thanspamMaxMessagesmessages inspamWindowSeconds, or the same message twice (on, 5)break_near_others_bed/open_container_near_others_bed: withinbedProtectRadiusblocks of another player's respawn point, even if they're offline (off by default)rapid_rejoin: rejoining withinrapidRejoinSecondsof leaving (on, 3)penalized_command: commands listed inpenalizedCommandswith their cost, e.g.{"spawn": 2, "tpa": 1}
- Thresholds: run a console command and/or send a message when a score drops
belowor risesabovea value.{player}is replaced with the player's name. Two examples ship disabled (slowness below 0, a diamond above 500).
Commands
/socialcredit: your own score/socialcredit <player>: another player's score/socialcredit top: leaderboard (leaderboardSizeentries)/socialcredit set|add|remove <players> <amount>: admins/socialcredit reset <players>: admins, back tostartingScore/socialcredit reload: admins, reload the config
Admins are players with permission level adminPermissionLevel (default 2, ops). Use player names, @p or @a (like /op, @s isn't accepted).
Config
config/social_credit_score.json is created on first start with every setting. Edit it and run /socialcredit reload. If the JSON has a mistake, the old settings stay and the server log says why. New settings from updates are added automatically. prefixFormat changes the tag, e.g. "[{score}★] ".
Requirements
Minecraft 1.21.1, Fabric Loader 0.20.1+, Fabric API. Server only.
Built step by step in the MineForge tutorial series (https://mineforge.dev).