Whitelist Rules
Automatic whitelist management: rule types, real-time sync, and how evaluation works.
How whitelist rules work
AdminWhitelist rules automatically manage who can join your Minecraft server. When someone links, unlinks, gains a role or loses a role, Madsi updates the Minecraft whitelist immediately; rules that depend on the clock (account age, time in the server) are re-checked hourly. Adding, enabling or deleting a rule re-applies your rules to everyone straight away.
Changes are synced in real-time over WebSocket, no server restart required.
Rule types
Admin- All linked users: Anyone who has linked their Minecraft account is whitelisted
- Specific role: Only members with a particular Discord role (who have also linked) are whitelisted
- Custom rule Pro: A tree of conditions combined with All of / Any of / Not. See Rule builder below
Rule builder
Pro AdminA custom rule is a tree. All of requires every condition beneath it, Any of requires at least one, and Not inverts the single condition beneath it. Nest them to express whatever your community actually means by "allowed in".
| Condition | Passes when |
|---|---|
| Has role | The member currently holds that Discord role |
| Account age | Their Discord account is at least N days old |
| Time in server | They have been in your Discord server at least N days |
Example: keep out throwaway alts while still letting trusted regulars in: Any of Has role @Veteran, All of Has role @Member, Account age 30 days, Time in server 7 days .
Every rule still requires a linked Minecraft account. A whitelist entry is made from a Minecraft UUID, so there is nothing to add without one.
Paid, purchasable and Server Booster roles can never appear in a rule. Gating Minecraft access on a Discord purchase breaches Mojang's Usage Guidelines.
A rule can hold up to 40 conditions and groups combined, nested at most 5 levels deep. If a guild drops off Pro, its custom rules are kept but stop granting access, and the Whitelist page says so on the rule.
Adding a rule
AdminGo to the Whitelist page in your dashboard, choose the rule type and click Add Rule. The new rule is applied to everyone who already qualifies, not just to people whose roles change later.
Manual entries
AdminYou can also manually whitelist individual players. Manual entries persist until explicitly removed. They are not affected by rule changes.
Rule-managed entries are kept in sync automatically: when someone stops matching every rule that covered them, they are removed, and the Remove button is disabled on those rows because a rule would put them straight back. The same goes for a player you added by hand whom a rule also covers: the row says so, and Remove comes back once no rule grants them. Deleting a rule instead turns the entries it added into manual ones, so those players keep access until you remove them.
How rules evaluate
AdminMadsi re-evaluates a member when they link or unlink, when their Discord roles change, when a rule is added, toggled or deleted, when a server reconnects, and hourly for rules that depend on the clock. Then:
- If any enabled rule grants access, the member is whitelisted
- If no rule grants access and they have no manual entry, they are removed
- Manual entries always grant access regardless of rules
- Deleting a rule keeps the players it added. They become manual entries rather than being removed
Entries you added yourself
AdminRules and syncs only ever remove players Madsi added. The mod keeps a list of them in config/madsi-whitelist.json, next to config/madsi.json. Anyone you put in whitelist.json yourself (with /whitelist add or by editing the file) stays, even if they later match a rule and then stop matching it. Someone Madsi added counts as yours once you take them off the whitelist yourself, so adding them back by hand keeps them on. Pressing Remove on an entry on the Whitelist page is different: it takes that player off the server even if you added them by hand (an older Madsi on the server keeps that removal pending until you update it). Remove is disabled on a player a rule is whitelisting, because the next sync would add them back: change the rule, or the Discord role it needs. Entries that were there before your server first connected with this version count as yours, except the ones Madsi's own records say it added.
Madsi turns whitelist enforcement on once the server has a rule that can grant access, after it has added everyone who qualifies. It never turns enforcement on for a server with no rules, so an empty list can't lock everyone out.
Turning whitelist management off
AdminMadsi manages the whitelist on each server's Settings page switches it all off for that server: Madsi stops adding and removing players and never turns enforcement on, including at startup. Nothing already on the whitelist is removed, and enforcement stays however you left it. Your rules are kept; switch management back on and Madsi applies them again straight away.