What Are Mystery Bags in Minecraft?
Imagine slaying a zombie and instead of rotten flesh, a colorful, glowing sack drops to the ground. You pick it up, right-click, and suddenly you are holding a diamond sword or a stack of golden apples. That is the core thrill of Mystery Bags, a powerful plugin designed for Spigot servers running Minecraft 1.9 and above. Coded from scratch to replace the inactive SurpriseBags plugin, Mystery Bags injects a loot-box style mechanic directly into your survival world, giving every mob kill a chance to reward players with random, fully customizable prizes.
Each Mystery Bag is an item that can be held in your main hand or off-hand. When a player opens it, the bag vanishes and leaves behind a random reward drawn from a loot table you define. The plugin tracks every bag opened, logs rare rewards, and even broadcasts special moments with fireworks and custom messages, making it perfect for economy servers, RPG adventures, or just spicing up vanilla gameplay.
Core Features That Set Mystery Bags Apart
Unlike simple loot tables, Mystery Bags offers deep customization and several quality-of-life improvements over its predecessor. Here is what makes it stand out:
- Mob-Specific Drop Chances: Each bag can have its own drop probability, and you can further vary the chance based on the mob type. Skeletons might drop a rare weapon bag more often than creepers, for instance.
- Dual-Hand Opening: Players can open a bag from either hand. If they hold a bag in both hands, both open simultaneously, doubling the surprise.
- Anti-Exploit Protection: Mystery Bags cannot be used in crafting, smelting, or brewing recipes, preventing players from accidentally or intentionally destroying them.
- Rare Reward Tracking and Announcements: Define “rare” items within a bag. When a player pulls one, the server can broadcast a custom message, launch fireworks, and play a sound effect. All bag-open counts and rare rewards are logged to a dedicated output file.
- Command Books for Console Execution: You can add items that, when received, run a console command as the player, using placeholders like
%P%for player name or%W%for world. This allows for rank upgrades, economy payouts, or teleport effects. - Region and World Limits: Drop restrictions are based on where the mob is killed, not where it spawned, giving more control over which areas yield bags.
Getting Started with Commands
Mystery Bags are managed entirely through in-game commands. The plugin creates a folder where each bag’s configuration is stored as a separate file, allowing you to edit rewards, chances, and display names with ease. Below are the essential commands you will use:
Bag Management
/mbag list– Displays all loaded Mystery Bag IDs./mbag addbag <id> [material]:[data]– Creates a new bag with the given ID and optional material. Always use this to generate a proper config file./mbag removebag <id>– Unloads a bag from memory without deleting its file, so you can safely edit it later./mbag spawn <id> [amount] [player]– Spawns physical bag items into a player’s inventory or the world.
Editing Bag Contents
/mbag edit <id>– Opens a visual Content Editor GUI where you can add items, set weights, and tweak rewards in real time./mbag save <id>– Saves all changes made in the GUI to the bag’s config file./mbag reload– Reloads all bags and config options from disk, useful after manual file edits.
Item Customization
/mbag setname <name>– Assigns a custom display name to the held item./mbag setlore <lore>– Sets lore text. Use/to separate lines./mbag addlore <lore>– Appends additional lore lines./mbag removelore [#lines]– Removes a specified number of lines from the bottom of the lore./mbag unbreakable– Toggles the Unbreakable tag on the held item (requires Spigot).
Advanced Reward Setup
/mbag stack <#>– Sets the literal stack size of the held item as used in item weight calculations./mbag amount <#>or<#-#>– Defines how many of that item a player receives, without altering its drop weight. Ranges like1-5are supported./mbag command <cmd>– Creates a Written Book that stores a command. When received from a bag, the book is consumed and the command runs from console. Holding an existing Command Book while using this command appends more commands to it.
When you are ready to put these bags into the world, you will appreciate how the plugin handles drop logic. Each bag file contains a drop-chance value that controls the probability of a bag dropping from any eligible mob. You can further refine this by adding mob-specific overrides, so a Wither Skeleton might have a 10% chance while a regular zombie stays at 2%. The plugin also respects WorldGuard region flags if you want to limit drops to certain areas.
If you are managing a modded server or simply want a smoother way to handle plugin installations, the foxygame.net launcher offers a convenient, flexible, and modern approach where you can download Mystery Bags and other mods directly from its menu. This eliminates manual file juggling and lets you focus on configuring those perfect loot tables.
Notable Differences from SurpriseBags
Mystery Bags was built to be as compatible as possible with existing SurpriseBags configurations, but a few key changes make migration straightforward if you follow the provided update guide. Here are the main points to keep in mind:
- There is no global drop chance. Every bag now has its own independent drop rate, removing an extra layer of RNG.
- Drop chance variation is now tied directly to mob type, not a separate global multiplier.
- The bag ID is hidden from the item’s lore, giving a cleaner look and preventing players from meta-gaming.
- Region and world limits apply at the moment of kill, not spawn, which is more intuitive for most server setups.
- Rare rewards are now fully configurable with broadcast messages, firework effects, and sound alerts.
To convert old SurpriseBags configs, simply copy the reward sections from your old files into the new Mystery Bags structure and adjust the drop chance and mob settings as needed. The plugin’s default config files are well-documented and can be found in the plugin’s folder after the first run.
Why Your Server Needs Mystery Bags
Mystery Bags transform the everyday grind of mob farming into an exciting lottery. Players stay engaged longer, eager to see what the next bag holds. The ability to run console commands from rewards opens up endless possibilities: granting temporary fly permissions, spawning custom structures, or even triggering entire quest chains. Because the plugin tracks every opening and logs rare pulls, you can monitor the economy and adjust drop rates to maintain balance.
Installation is straightforward. Drop the JAR file into your server’s plugins folder, restart, and start creating bags with /mbag addbag. The permission nodes mysterybags.open (default for all players) and mysterybags.admin (for operators) keep control in the right hands. The source code is available on GitHub for those who wish to review or contribute.
Whether you run a small community server or a large network, Mystery Bags adds a layer of surprise that feels native to Minecraft’s blocky charm. Give your players something to look forward to with every swing of their sword.