Kourosh Lashkari

Platform: Minecraft Java 26.3, Fabric Purpose: Limit the entire server to a maximum of 2 maces.

  1. Mace limit
  • Maximum of 2 maces across the entire server.
  • Players cannot craft a third mace if two already exist.
  • Applies to both survival and creative crafting.
  • If a mace is destroyed, another can be crafted.

2. Where maces count The mod must count maces in:

  • Player inventories.
  • Normal chests and trapped chests.
  • Barrels.
  • Shulker boxes.
  • Dropped items on the ground.
  • Other storage containers.

3. Ender Chest restriction

  • Players cannot put maces into Ender Chests.
  • This applies to every mace, including ones obtained through /give.

4. /give command

  • /give is allowed to create additional maces.
  • These maces still count towards the global limit.
  • /give does not bypass the Ender Chest restriction.

5. Persistence

  • The mace count must survive server restarts.
  • The mod must account for maces in unloaded chunks.
  • Moving maces between containers must not accidentally create extra available slots.

6. Installation

  • Server-side Fabric mod.
  • Players do not need to install it on their clients.
  • Delivered as a .jar file.

Mod name: MaceLimit

Kodari AI
KodariNov 7 at 8:43 am 3
MaceLimit
MaceLimit is a server-side Fabric mod for Minecraft Java 26.3 that enforces a global limit of 2 maces across the entire server. The mod tracks maces in player inventories, chests, trapped chests, barrels, shulker boxes, dropped items, and all other storage containers, including unloaded chunks. It prevents crafting a third mace when two already exist, applying to both survival and creative modes. Ender Chests are restricted, preventing players from storing maces inside them, including maces obtained via /give. The /give command can create additional maces, but they still count toward the global limit and remain subject to the Ender Chest restriction. The mace count persists across server restarts, and moving maces between containers does not create extra available slots. The mod is installed server-side only, requiring no client installation, and is delivered as a .jar file.
  1. Build persistent server-wide mace counting that survives restarts and unloaded chunks.

  2. Block crafting past two, while allowing /give to create counted maces.

  3. Prevent mace insertion into Ender Chests and package this as a server-side Fabric mod.

Implemented MaceLimit as a server-side Fabric 26.3 mod. Players don’t need it on their clients. It blocks taking a crafted mace when two are already counted, including in creative, and blocks putting maces into Ender Chests. /give remains allowed; given maces are counted.

Counts cover player inventories, Ender Chests, loaded block and entity containers, and dropped items. Per-chunk and per-player counts persist across unloads and restarts. Existing-world caveat: a chunk containing maces that has never loaded since the mod was installed won’t be indexed until it loads.

To get the jar: click Compile in the top bar (or ⋮ → Compile Project on phone), click Compile in the window, then Download on the successful build.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
9 324
src/main/java/com/kodari/macelimit/MaceLimit.java
package com.kodari.macelimit;

import net.fabricmc.api.ModInitializer;

public class MaceLimit implements ModInitializer {
    public static final String MOD_ID = "macelimit";

    @Override
    public void onInitialize() {
        MaceLimitTracker.initialize();
    }
}