Overview:
Optimizator is an advanced Minecraft Spigot/Paper plugin for version 1.21 and latest designed to optimize villager trading mechanics, prevent trading-induced lag, and grant custom trading privileges to specific players or globally. This allows selected players to trade with villagers and wandering traders without trades ever becoming locked or exhausted, while maintaining standard vanilla limits for everyone else unless global mode is toggled.
Key Features:
- Infinite Trades: Designated players (or everyone globally) can perform unlimited trades with villagers and wandering traders with no red X appearing on trade arrows.
- Wandering Trader Support: Fully extends all infinite‑trade and price‑mode logic to Wandering Traders (AbstractVillager) via the optimize-wandering-traders config switch.
- Anti-Theft GUI Security: Secure built-in interface displaying player heads and whitelist data with complete protection against item-duplication and head-stealing exploits (blocks shift-clicks, hotbar swapping, and item dragging).
- Asynchronous Performance: Automatically saves statistics asynchronously upon player quit and utilizes thread-safe ConcurrentHashMap structures to ensure zero impact on main server thread TPS.
- Split Data Management: Whitelist data is stored safely by UUID in a dedicated data.yml, while trade statistics use tradestats.yml, keeping config.yml clean and lowering active disk I/O.
- Dynamic Price Modes: Features 3 configurable levels via price-mode in config.yml (INCREASE for doubled price multipliers, NORMAL for a balanced emerald discount, CHEAP for forcing all trade costs to exactly 1 emerald).
- Per-World Overrides: Full capability to customize or disable specific features, max trades, and price multipliers on a per-world basis.
- Command Management: Complete tab-completion support for all actions, arguments, and online player names.
Commands:
- /infinitevillager add <player|uuid> - Adds a player to the infinite‑trader whitelist (requires optimizator.infinitevillager.add).
- /infinitevillager remove <player|uuid> - Removes a player from the whitelist (requires optimizator.infinitevillager.remove).
- /infinitevillager list - Lists all UUIDs currently in the whitelist (requires optimizator.infinitevillager).
- /infinitevillager gui - Opens the secure GUI menu showing player heads for the whitelist (requires optimizator.infinitevillager.gui).
- /infinitevillager stats [player] - Shows detailed trade statistics for the specified player or yourself (requires optimizator.infinitevillager.stats).
- /infinitevillager clear - Clears all entries from the whitelist entirely (requires optimizator.infinitevillager.clear).
- /infinitevillager reload - Reloads the config.yml and data.yml configuration files (requires optimizator.infinitevillager.reload).
- /infinitevillager help - Displays help messages and descriptions for all available sub‑commands.
Permissions:
- optimizator.infinitevillager - Base permission required to use the command and list entries (default: op).
- optimizator.infinitevillager.add - Allows adding players to the whitelist (default: false).
- optimizator.infinitevillager.remove - Allows removing players from the whitelist (default: false).
- optimizator.infinitevillager.list - Allows viewing the whitelist entries (default: false).
- optimizator.infinitevillager.gui - Allows opening the whitelist GUI layout (default: false).
- optimizator.infinitevillager.stats - Allows viewing trade statistics logs (default: false).
- optimizator.infinitevillager.clear - Allows completely wiping the whitelist data (default: op).
- optimizator.infinitevillager.reload - Allows reloading the configuration files (default: op).
Installation:
1. Place the compiled JAR file in your server's plugins folder.
2. Restart the server or use a plugin manager to load it.
3. Configure permissions, global settings, and price modes in config.yml as needed.
Compatibility:
- Minecraft
1.21+
-
Spigot/Paper API
![[IMG]](//proxy.spigotmc.org/df11c182096a85afb9807d52d7b3a24a935ddffd/68747470733a2f2f696d61676573372e6d656d6564726f69642e636f6d2f696d616765732f55504c4f414445443534382f363633643832663732343663382e6a706567)