Social Credit Score

Server-side engagement score shown next to every player's name in chat: earn points by playing, lose them for filtered words and actions the owner picks.

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 below lowTier, yellow in between, green from highTier. Scores are saved with the world.
  • Earning points: chatPoints for chatting (at most once per chatCooldownSeconds), playtimePoints per playtimeMinutes of active play. Players idle for afkSeconds earn nothing.
  • Chat filter: blockedWords (whole words), blockedPhrases (word sequences) and blockedPatterns (Java regex, case-insensitive). Catches leetspeak (d4mn), spacing (d a m n), stretched letters (daaamn) and punctuation. filterMode: allow (penalty only), censor (stars) or block (message not sent). Costs filterPenalty points.
  • Negative actions: each entry in actions has enabled, points and cooldownSeconds:
    • player_kill: killing another player (on, 25)
    • chat_spam: more than spamMaxMessages messages in spamWindowSeconds, or the same message twice (on, 5)
    • break_near_others_bed / open_container_near_others_bed: within bedProtectRadius blocks of another player's respawn point, even if they're offline (off by default)
    • rapid_rejoin: rejoining within rapidRejoinSeconds of leaving (on, 3)
    • penalized_command: commands listed in penalizedCommands with their cost, e.g. {"spawn": 2, "tpa": 1}
  • Thresholds: run a console command and/or send a message when a score drops below or rises above a 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 (leaderboardSize entries)
  • /socialcredit set|add|remove <players> <amount>: admins
  • /socialcredit reset <players>: admins, back to startingScore
  • /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).

Social Credit Score Team

profile avatar
  • 3
    Projects
  • 76
    Downloads

More from MineForge