Tags
Creators
Details
Licensed GPL-3.0-only
Published 2 years ago
Updated 2 days ago
All versions
1.1.2.1
Release
zMenu 1.1.2.12 days ago 287
Uploaded by
Compatibility
Minecraft: Java Edition
26.3
26.2
26.1.x
1.21.x
1.20.x
Platforms
Folia
Paper
Purpur
Spigot
Changes
New Features
database-configuration.max-lifetimeoption: newconfig.ymlkey, in seconds (default1800), that sets the maximum lifetime of a pooled MySQL/MariaDB connection. It is passed to Sarah as the HikariCP max lifetime.0keeps connections until the pool closes, a missing or negative value keeps Sarah's default of 30 minutes, and Hikari requires at least 30 seconds. The value is also read from the global database configuration when one is used. Sarah was updated from1.25to1.26.- API:
ButtonManager#registerRuleLoader(RuleLoader): third-party plugins can now register their own rule types (and their aliases), usable in therulesection ofitem_dragbuttons and in theitem-rulerequirement. Until now only loaders annotated with@AutoRuleLoaderinside zMenu were discovered. - API: ItemStack serialization and SoundOption factory:
InventoryManagernow exposesserializeItemStack(ItemStack),deserializeItemStack(String)andcreateSoundOption(String soundName, String categoryName, float pitch, float volume[, boolean isCustom]), which resolves the sound through XSound and returnsnullwhen the sound is unknown. - API: item update hooks: added
InventoryListener#updateItem(BaseInventory, boolean inPlayerInventory, ItemButton), called when an already-placed button's item is replaced after the inventory opens (returningtrueskips the default placement),ItemButton#setDisplayItem(ItemStack)andVInventory#updateItem(boolean inPlayerInventory, int slot, ItemStack, boolean enableAntiDupe).
Improvements
- Memory usage: several caches and per-player maps that kept growing over time are now bounded or cleaned up:
- The PlaceholderAPI result cache (
enable-cache-placeholder-api/cache-placeholder-api) is now a bounded cache (10,000 entries) whose entries really expire after the configured duration. Expired entries used to never be removed. OfflinePlayerCacheno longer caches onlinePlayerobjects, which could stay in memory after a logout. The cache is also cleared on/zm reloadand when the plugin is disabled.ItemStackUtilsno longer keeps every serialized or deserialized item in a static map.- Command player arguments, on-click item mechanic cooldowns,
item_dragtask states and PacketEvents fake inventory contents are now removed when the player disconnects (or the inventory closes). - The PacketEvents title and title-animation listeners now remove a player's data when they disconnect.
- The PlaceholderAPI result cache (
- Refreshing buttons on Folia: buttons refreshed on a timer (
update/refresh-on-clickrefresh requirements and the inventoryupdate-interval) now run on the viewing player's scheduler instead of a sharedjava.util.Timerthread. Every refresh task of an inventory is cancelled as soon as it closes, and a slot's old refresh task is cancelled when it gets a new one, so tasks no longer pile up. - Item check after
/zm reload: the custom-item inventory check now runs on each player's own scheduler instead of one async task for all players, so player inventories are no longer accessed off-thread. - Button commands scheduling: console and player commands of a button (except those sent through the player's chat) are now always scheduled, on every platform: on the player's scheduler, or on the next tick for the console. On Spigot/Paper they used to run immediately, so they may now run one tick later.
- Performance: the
getTopInventorymethod lookup, used on every click, move and packet, is now cached per view class instead of being resolved by reflection each time. The move/teleport distance check exits early whenclose-inventory-on-moveis disabled. Color translation (color()/colorReverse()) reuses precompiled patterns and skips hex processing when the text has no#. - More configuration warnings: zMenu now logs a warning, with the file and button path, instead of silently
ignoring:
- an
ANVILinventory loaded below Minecraft 1.21 (the menu falls back to a chest andrename-requirementsdo not run); - a
title-animationsection with no matching title animation provider (PacketEvents is probably missing); - an unknown
item_dragcheck-itemtype(it still falls back tofull); - a
ButtonOptionclass that cannot be instantiated (reported once per class).
- an
- Button options:
ButtonOptionclasses no longer need a public constructor that takes aPlugin; a public no-argument constructor is used as a fallback. Before, such an option was silently dropped. - Title animation provider:
title-animation.pluginis now matched case-insensitively, and whenpluginis omitted the first registered provider is always used, instead of an arbitrary one. /zm dumplog: the uploaded log URL is now always sent as a clickable link, on every platform.- Bundled dialog examples: the default dialog files now use
after-action(the key the loader actually reads,after_actionwas ignored) and list its real values (CLOSE,NONE,WAIT_FOR_RESPONSE). Text inputs in the examples and inbedrock/custom-form.ymlnow usedefault-valueinstead ofinitial-value. Existing installs keep their files and must rename these keys by hand. - API: removed
Tuples: the unused recordfr.maxlego08.menu.api.utils.Tupleswas deleted from the API module. This is a breaking change for plugins that referenced it. - Builds are now reproducible (fixed file timestamps and order in the jars).
Fixes
/zm downloadcheck was inverted: the command was blocked whenenable-download-commandwastrueand allowed when it wasfalse. It now runs only whenenable-download-command: trueis set. The error message also points toconfig.ymlinstead ofconfig.json.- Invalid
item_dragrules: when therulesection of anitem_dragbutton is invalid, the button now refuses every item and logs a warning. It used to accept any item. - Player heads in player-inventory buttons: a
player_headbutton placed in the player inventory now receives its asynchronously loaded texture in the player inventory slot, instead of the same slot number of the menu. With the PacketEvents clear-inventory mode, the late head update is sent by packet without modifying the real inventory. - Paper 26.3 item components: the
Paper-26-3hook (components such asattack_animation,interact_animation,mob_visibility,provides_pottery_pattern,sign_text,villager_food,waxed) is now packaged inzMenu.jar. It was missing, so these components were unavailable. - MythicMobs items:
mythicmobs:materials now generate the full item (name, lore, enchantments, NBT...) instead of returning Mythic's cached base item. %zmenu_player_previous_page%no longer returns a negative value on the first page.%zmenu_statistic_hours_played%returned minutes instead of hours.- Case-insensitive action registration: actions registered by third-party plugins with uppercase or
mixed-case keys through
ButtonManager#registerActioncould never be found. - Opening a menu with PacketEvents fake-inventory contents no longer spams debug lines in the console.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:XPQ42u1g:v6xNp3NN"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:XPQ42u1g:v6xNp3NN"
}

