Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
AntiSweats
A lightweight Bukkit/Spigot plugin for Minecraft 1.21 that lets you restrict what players can mine and carry. Built for a Life Series and event servers where you want to gate resources by game phase.
How it works
You set up sessions, named phases like session1, session2, session3. Each session has its own rules. When you're ready to move the game forward, you run one command and the active session switches instantly. That's it.
There are three types of rules you can put in a session:
| Type | Example | Effect |
|---|---|---|
| Block rule | diamond-mining |
Nobody mines that resource, period |
| Mining cap | diamond-mining-cap |
Each player gets a personal limit before they're cut off |
| Item limit | limit TNT 20 |
Nobody holds more than X of an item at once |
Installation
- Drop the jar into your
plugins/folder and start the server - Three files get generated automatically:
config.yml- your live config, modified by in-game commandsdefault-config.yml- your factory defaults, never touched by the pluginplayerdata.yml- per-player mining counts
- All commands require OP or the
antisweats.adminpermission
Commands
Tab completion works on everything: session names, rule names, material names, player names.
Session management
/as session list
/as session switch <name>
/as session create <name>
/as session delete <name>
/as session reset <name>
/as session info <name>
/as session default
/as session default <name>
Details for each session command
/as session list
Lists every session and marks which one is currently active.
/as session switch <name>
Switches the active session. Rules update immediately for everyone on the server.
/as session create <name>
Creates a new empty session. Start adding rules to it with /as rule add.
/as session delete <name>
Permanently deletes a session. You can't delete the active one, switch away first.
/as session reset <name>
Wipes all rules from a session without deleting it.
/as session info <name>
Shows every active rule in a session, cap amounts, and when each rule unlocks based on your session order.
/as session default
Restores every session at once back to what's in default-config.yml.
/as session default <name>
Same thing but for a single session.
Rule management
/as rule list
/as rule add <session> <rule>
/as rule add <session> <cap-rule> <amount>
/as rule add <session> limit <MATERIAL> <amount>
/as rule remove <session> <rule>
/as rule remove <session> limit <MATERIAL>
Details for each rule command
/as rule list
Shows all valid block and cap rule keys, plus a reminder of the item limit syntax.
/as rule add <session> <rule>
Adds a full block rule. Nobody in that session can mine the resource.
/as rule add session1 diamond-mining
/as rule add session1 gold-mining
/as rule add <session> <cap-rule> <amount>
Adds a per-player mining cap. They can mine up to the number you set, then they're blocked.
/as rule add session2 diamond-mining-cap 8
/as rule add session2 gold-mining-cap 24
Block and cap rules for the same resource are mutually exclusive within a session. You can't have
diamond-mininganddiamond-mining-capactive at the same time.
/as rule add <session> limit <MATERIAL> <amount>
Caps how much of any item a player can hold at once. Works with any valid Minecraft material name — just start typing after limit and tab completion will suggest the rest.
/as rule add session1 limit TNT 20
/as rule add session1 limit ENDER_PEARL 8
/as rule add session2 limit GOLDEN_APPLE 16
/as rule remove <session> <rule>
Removes a block or cap rule.
/as rule remove <session> limit <MATERIAL>
Removes an item limit.
Player management
/as player info <player>
/as player reset <player>
/as player reset <player> <cap-rule>
Details for each player command
/as player info <player>
Shows a player's current mining counts vs. their cap for the active session.
Mining counts for Steve:
- diamond: 6 / 8
- gold: 19 / 24
/as player reset <player>
Resets all mining counts for a player to zero. Run this between games.
/as player reset <player> <cap-rule>
Resets just one resource for a player.
/as player reset Steve diamond-mining-cap
Supported resources
These are the resources with built-in block and cap rule support:
| Resource | Block rule | Cap rule |
|---|---|---|
| Diamond | diamond-mining |
diamond-mining-cap |
| Gold | gold-mining |
gold-mining-cap |
| Cobweb | cobweb-mining |
cobweb-mining-cap |
Item limits (limit <MATERIAL> <amount>) work with any Minecraft material with no extra setup.
Item limits in depth
Item limits are enforced in three places so there are no loopholes:
- Ground pickup - partial pickup is supported. If a player needs 3 more TNT to hit the cap and walks over a stack of 64, they pick up exactly 3 and the other 61 stay on the ground.
- Chests and containers - taking items from any chest, shulker box, ender chest, or hopper is checked too. Excess gets dropped at the player's feet.
- Internal inventory moves - shift-clicking between hotbar and main inventory, dragging, number-key swaps, all covered.
When a player gets blocked from picking something up, they get a chat message. If the item is still nearby, the message repeats once per second until it's gone or they walk away. No spam, but they won't miss it either.
Typical game setup
Here's a quick example of how you'd structure a three-phase Life Series:
# Phase 1 — no diamond/gold at all, strict item limits
/as rule add session1 diamond-mining
/as rule add session1 gold-mining
/as rule add session1 limit ENDER_PEARL 8
/as rule add session1 limit TNT 20
/as rule add session1 limit GOLDEN_APPLE 16
# Phase 2 — mining unlocks but is capped
/as rule add session2 diamond-mining-cap 8
/as rule add session2 gold-mining-cap 24
/as rule add session2 limit ENDER_PEARL 8
/as rule add session2 limit TNT 20
/as rule add session2 limit GOLDEN_APPLE 16
# Phase 3 — no mining restrictions, only item limits
/as rule add session3 limit ENDER_PEARL 8
/as rule add session3 limit TNT 20
Then during the game:
/as session switch session1 ← game starts
/as session switch session2 ← mid game
/as session switch session3 ← late game
A few things worth knowing
- Mining counts carry across sessions. If a player mines 5 diamonds in session1, those 5 still count toward their cap in session2. Run
/as player reset <player>between games. - Explosion protection is automatic. Any resource with an active block or cap rule is also protected from TNT and creepers, no bypassing restrictions by blowing up the ground.
default-config.ymlis yours to edit. It's the reference file for/as session default. The plugin never writes to it, so whatever you put in there is what gets restored. No restart needed after editing it, just run the command.session-orderinconfig.ymlcontrols the unlock message players see when they're blocked. Keep it in the order your game actually progresses and the messages will always be accurate.


