Scanner
Compatible Server Version(s):
1.19+
Author(s): hubailmn
🔧 Features
- Scan online and offline players’ inventories for specific items.
- Scan WorldGuard regions for specific items.
- Add/remove tracked items to a persistent database.
- View paginated scan results for both players and regions.
- Update all online player inventories asynchronously.
- Automatically log top item holders to Discord every 30 minutes.
- Seamless WorldGuard integration.
- Lightweight YAML configuration.
📥 Installation
- Download the latest
.jar - Place it in your server’s
plugins/directory. - Restart or reload the server.
📦 Dependencies
The following dependencies are required for this plugin to work properly. Please ensure they are installed and up to date on your server.
- WorldGuard – Used for accessing and scanning protected regions.
- JDA (Java Discord API) – Used for sending logs to Discord (bundled in plugin).
🛠️ How It Works
The Scanner plugin continuously tracks players and their inventories by recording data when:
-
A player joins or leaves the server.
-
A scheduled inventory update occurs (based on the interval defined in the config).
To detect duplication effectively, the plugin must be installed before any duping occurs, as it does not retroactively analyze past data.
🔍 Scanning for an Item
To scan player inventories for a specific item:
- Hold the item you want to track in your main hand.
- Use the command:
The plugin will analyze all offline players’ inventories and return a list of users who possess the item, sorted by quantity.
📌 Note on notifyAmount
Only players or regions with item counts above the configured
notifyAmountwill appear in scan results.
This setting does not affect tracking or inventory updates — only what gets shown in messages.
💬 Commands
| Command | Permission | Description |
|---|---|---|
/scanner scan |
scanner.scan |
Scans all offline and online players' inventories. |
/scanner region <region> |
scanner.region |
Scans a specific WorldGuard region. |
/scanner update |
scanner.update |
Updates the inventories of all online players. |
/scanner page <number> |
scanner.page |
View a specific page of your personal scan results. |
/scanner nextPage <number> |
scanner.page |
Navigate to the next page in the current scan results. |
/scanner addItem |
scanner.edititem |
Adds the item in your hand to the scanned item list. |
/scanner removeItem |
scanner.edititem |
Removes the item in your hand from the item list. |
🔐 Permissions
| Permission | Default | Description |
|---|---|---|
scanner.scan |
op |
Allows scanning all offline players. |
scanner.region |
op |
Allows scanning a specific WorldGuard region. |
scanner.update |
op |
Allows updating all online player inventories. |
scanner.page |
op |
Allows using page navigation commands. |
scanner.edititem |
op |
Allows adding or removing scanned items. |
🧾 Discord Logging (Optional)
If enabled in the plugin’s configuration, Scanner will integrate with your Discord server via a bot using the JDA library. This feature will:
- Post an embed every 30 minutes listing the top 10 players with the most of each tracked item.
- Automatically edit previous messages to avoid clutter.
- Customize the bot’s activity/status and output channel via config.yml.
Requirements:
- A valid Discord bot token.
- A configured Discord channel ID.