Mod Classes
Split your modpack into classes like Magic, Tech and Warfare, and decide which players can use which.
Mod Classes sorts every installed mod into a class automatically, then lets server admins lock individual players out of whole classes with one command. It is built for "Magic vs Tech" servers, faction SMPs and roleplay packs where each player picks a path and sticks to it.
Server-side only. Put it in the server's mods folder and players do not need to install anything. It also works in single player and LAN worlds.
Features
- Automatic sorting. Every mod is placed into Magic, Tech, Warfare, Medieval, Colony, Farming & Food, Storage, Decoration, World, Utility or Misc with no setup.
- Per-player blacklist. Block any player from any class, or assign them a path and have the other paths blocked for you.
- Works on offline players. Restrictions are stored by UUID and survive restarts.
- Add-on aware. A Mekanism add-on is Tech and an Ars Nouveau add-on is Magic, without you listing them.
- Hybrid mods. A mod that needs both a magic and a tech mod belongs to both classes and requires access to both.
- Fully editable. Move a whole mod, or a single item or block, to a different class in game. Add your own classes and keywords in the config.
- Transparent. A report file lists every mod, its class and the reason it was put there.
- Vanilla is never restricted.
How mods are sorted
The first rule that matches wins:
- Your own overrides
- A built-in list of well known mods
- Add-ons take the class of the mods they require
- Keywords in the mod's id, name and description
- Mods with no items, blocks or entities become Utility; anything left is Misc
The result is written to config/modclasses/classification.txt on every server start. Entries decided by keywords alone are marked [guess] so you know which ones to double-check.
What a blocked player cannot do
With content from a class they are locked out of, a player cannot:
- Use items or attack and mine with them
- Hold them in either hand (this is what stops guns and other key-triggered items)
- Wear armor, or Curios and Accessories trinkets
- Place blocks, open machines and other blocks, or keep their screens open
- Interact with entities
- Take the item out of a crafting grid
Every rule can be switched on or off in config/modclasses-common.toml. By default players can still carry restricted items so they can trade them, and can still break restricted blocks. Optional stricter settings stop pickup, stop breaking, or drop restricted items from the inventory entirely.
Commands
All commands are under /modclass and need operator level 2, except me.
| Command | What it does |
|---|---|
block <players> <class> |
Lock players out of a class |
unblock <players> <class> |
Give a class back |
assign <players> <class...> |
Pick a path and block every other exclusive class |
clear <players> |
Remove all restrictions |
check <players> / players |
Show restrictions for some or all players |
classes / mods <class> / info <modid> / hand |
Inspect the sorting |
setmod <modid> <class...> / resetmod <modid> |
Move a mod to other classes, or back to automatic |
setid <modid:name> <class...> / resetid <modid:name> |
Override a single item, block or entity |
reload |
Re-read the config files |
me |
Any player: show what I am locked out of |
Example: /modclass assign Steve magic blocks Steve from Tech and Warfare. /modclass assign Alex tech warfare blocks Alex from Magic.
The exclusive classes are Magic, Tech and Warfare by default and can be changed in the config.
Configuration files
config/modclasses/classes.json: class definitions, keywords and overridesconfig/modclasses/players.json: who is blocked from whatconfig/modclasses/classification.txt: the generated reportconfig/modclasses-common.toml: enforcement switches
Compatibility
- Minecraft 1.20.1, Forge 47 or newer
- No dependencies
- Optional support for Curios and Accessories slots; neither is required
- Automation that acts as a fake player, such as machines and deployers, is ignored
Known limits
- Abilities a player already unlocked inside another mod before being blocked, such as learned spells or research, are not revoked.
- Items made by machines rather than a crafting grid can still be produced, but still cannot be held, used or worn.
- Automatic sorting is a best effort. Check the report and correct anything you disagree with using
/modclass setmod.
FAQ
Do players need to install it? No. It only has to be on the server.
Can I use it in a modpack? Yes.
A mod is in the wrong class. How do I fix it?
Run /modclass setmod <modid> <class>. The change is saved and applies immediately.
Can I let a blocked player use one specific item?
Yes. Run /modclass setid <modid:item> misc to take that item out of its mod's class.
Can I add my own classes?
Yes. Add them to classes.json and run /modclass reload.