Fork notice: This is a personal fork of OpenVdra/SmartSpawner (v1.8.1) with additional hologram lifecycle management, sellwand features, GUI improvements, and API enhancements. Not affiliated with upstream. Original plugin by NightExpress.
Upstream documentation: https://docs.smartspawner.site
SmartSpawner is a Minecraft (Paper) plugin that turns vanilla spawners into fully-featured smart spawners with virtual storage, EXP, stacking, GUI control, and shop/economy integration.
This fork keeps everything from upstream and adds a set of features aimed at large, dense servers: reducing hologram entity overhead, expanding sellwand functionality, optimizing hopper throughput, and exposing spawner data cleanly through the plugin API.
Upstream spawns one TextDisplay per spawner and keeps it alive permanently. On servers with
thousands of spawners that becomes a measurable entity count and tick cost. This fork replaces
the always-on model with a gate + cap system.
hologram.show_radius— a spawner's hologram only exists while at least one player is within N blocks. Set to0to disable and return to upstream behavior.hologram.max_per_player— withinshow_radius, each player only loads their nearest N spawner holograms.0= unlimited.hologram.visibility_interval— how often the gate is re-evaluated (default1s).- Rate-limited orphan cleanup — startup sweep + recurring 30-minute sweep that removes
orphaned
SmartSpawner-Holo-*displays whose spawner no longer exists in the database or whose block is no longer a SPAWNER. SpawnerData.hologramSuppressed— a lifecycle flag that prevents reload/refresh paths from silently resurrecting a hologram the distance gate just removed.
Implemented in:
commands/hologram/HologramVisibilityTask.javaspawner/properties/SpawnerData.javaSmartSpawner.javaconfig.ymlunderhologram:andhologram.cleanup:
-
New
/ss sellwandGUI where players sacrifice a sellwand to apply its multiplier and remaining uses to a spawner. -
Multiplier and uses are read from the sellwand's item lore using configurable regex:
sellwand: multiplier_regex: (?i)Multiplier:\s*([0-9.]+)x uses_regex: (?i)Uses:\s*([0-9]+|∞) -
Per-spawner tracked state (
SellwandStorage) with usage countdown.
Implemented in:
commands/sellwand/SellwandGUI.javacommands/sellwand/SellwandHolder.javacommands/sellwand/SellwandListener.javacommands/sellwand/SellwandSellListener.javacommands/sellwand/SellwandStorage.javacommands/sellwand/SellwandSubCommand.java
- Bundled
core/libs/AxSellWands.jarand a dedicated listener + integration layer. - Sellwand state shared with the spawner sell system so multipliers apply to the sell pipeline.
4. Glowing sellwands with hidden enchants
- Sellwand items are enchanted with a dummy enchantment and marked with the item's hide-enchants flag.
- Result: items appear enchanted (glow effect) but show no enchantment lines in the tooltip.
near.max_highlightslimits how many spawners/ss nearwill highlight per scan.- Prevents client-side lag on servers with thousands of nearby spawners.
Implemented in:
commands/near/SpawnerHighlightManager.javacommands/near/NearResultGUI.java
- Spawner GUI now shows used / max storage as a percentage, and the same for EXP storage.
- Values are exposed in a format any other plugin can read from the GUI item's lore or through the API — no need to open the GUI or parse NBT manually.
- Spawner data is readable by any other plugin through the
SmartSpawnerAPIinterface. - Player-aware sell values, programmatic sells, async spawner removal, and custom GUI layout providers are exposed.
See API.md for the full reference.
- Auto-sell requires only
smartspawner.autosell(no longer also requiressmartspawner.sellall). - Losing
smartspawner.autosellclears the player's auto-sell flag automatically, so it stops running and the GUI reflects OFF.
- New
HologramDebugLoggerwrites hologram lifecycle events to a dedicated file (plugins/SmartSpawner/hologram-debug.log), gated byhologram.debug_log.enabled. - Deliberately separate from the global
debugflag so you can trace hologram removals without enabling console spam everywhere else. - Records removals (orphan, malformed, admin clear) with reason, identifier, world, and coordinates, plus optional scan summaries and size-based rotation.
The fork ships upstream's defaults unchanged, plus the new keys documented above
(hologram.show_radius, hologram.max_per_player, hologram.visibility_interval,
hologram.cleanup.*, hologram.debug_log.*, near.max_highlights,
sellwand.multiplier_regex, sellwand.uses_regex, hopper.max_per_tick).
Upstream's hopper code scanned the spawner's full virtual inventory on every transfer cycle — with 1M pages of items stored, that's a sort of every entry, per hopper, per cycle. On a 10k-hopper oneblock this drove MSPT past 300 and dropped TPS to 1.
This fork replaces it with a constant-cost fast path:
- Page-1 sorted cache —
getDisplayRange(0, 45)andgetDisplayPage(1, 45)return a cached first page. Built once per inventory change, not once per hopper. - Unsorted fast cache —
peekAnyItems(limit)reads directly from the raw item map without sorting. Cost is O(stack_per_transfer), independent of total inventory depth. - Round-robin scheduling —
HopperServiceprocesseshopper.max_per_tickhoppers per tick instead of dispatching every hopper in one tick. Eliminates the per-tick spike. - GUI update gate — spawner GUI refreshes only fire when a viewer is present, not on every hopper transfer.
hopper.max_per_tick— new config key, default 50. Throughput =max_per_tick * 20hoppers per second. 10k hoppers with the default sweeps in ~10 seconds.
All three caches are invalidated on any inventory mutation (addItem, addItems, removeItem, removeItems, sortItems, setMaxSlots), so stale items can't be pulled.
Implemented in:
extras/HopperService.javaextras/HopperTransfer.javaextras/HopperConfig.javaspawner/properties/VirtualInventory.javaconfig.ymlunderhopper:
Tested on a 10k-hopper oneblock: MSPT stays in single digits, TPS holds at 20.
- Server: Paper 1.21+ (Folia support is inherited from upstream but has not been regression-tested for the fork additions.)
- Java: 21+
- Optional integrations: Vault, EssentialsX Economy, EconomyShopGUI, AxSellWands, WorldGuard, SuperiorSkyblock2, AuraSkills, MythicMobs, and the other upstream-supported plugins.
The build requires the AxSellWands-1.17.2.jar plugin jar. It is not included in this repo (see LICENSE terms of the AxSellWands plugin before redistributing).
-
Create a folder
core/libsif it doesn't already exist. -
Place your copy of the AxSellWands plugin jar there.
-
Rename it to
AxSellWands.jar(the build references it by that exact name). -
Then run:
./gradlew build
Jar output: core/build/libs/
The upstream plugin supports Folia. The fork additions in HologramVisibilityTask run the
visibility pass on the main thread and read blocks/entities directly. On Paper this is fine.
On Folia, the visibility pass and orphan sweep should be audited before deploying.
Inherits the upstream license. See LICENSE.
Original work © NightExpress. Fork additions © the fork author.
- Upstream plugin: OpenVdra/SmartSpawner
- Fork features, sellwand GUI, hologram lifecycle, API surface: this repo