๐ Changelog: See CHANGELOG.en.md for version history.
FilteredHopper is a powerful Minecraft plugin that adds intelligent filtering functionality to hoppers, allowing players to control exactly which items their hoppers collect through an intuitive graphical interface.
- ๐ง Intelligent Item Filtering: Configure hoppers to collect only specific items
- ๐ฎ In-Game GUI: User-friendly interface for filter configuration (Shift + Right-click)
- ๐ค Ownership System: Each filtered hopper has an owner who controls access
- ๐ Permission System: Share filtered hoppers with other players
- ๐๏ธ SuperiorSkyblock2 Integration: Island members can automatically share filtered hoppers
- ๐พ Persistent Data: All hopper configurations are saved in SQLite database
- ๐ Automatic Backups: Configurable automatic database backup system
- ๐ Statistics: Command to view detailed hopper statistics
- โ๏ธ Configurable Limits: Limit the number of hoppers per player or per chunk
- ๐ Public API: API for third-party plugin developers
- ๐ Multi-Language Support: Italian and English translations included
- ๐ต Sound and Visual Effects: Enhanced user experience with audio-visual feedback
- โก Optimised Performance: Efficient chunk-based hopper management with database indexes
- ๐ฎ Creative/Survival Mode Support: Different behaviours for different game modes
- Server: Spigot/Paper 1.21+
- Java: 17 or higher
- Optional Dependencies: SuperiorSkyblock2 (for island integration)
- Download the plugin
.jarfile - Place the
.jarfile in your server'spluginsfolder - Restart or reload your server
- Configuration files will be automatically generated
| Command | Description | Permission | Default |
|---|---|---|---|
/hopper give <player> [amount] |
Give filtered hoppers to a player | filteredhopper.admin |
OP |
/hopper list [player] |
List all filtered hoppers | filteredhopper.admin |
OP |
/hopper stats |
View filtered hopper statistics | filteredhopper.admin |
OP |
/hopper addperm <player> [uuid] |
Grant hopper access to another player | filteredhopper.addperm |
Everyone |
/hopper trust <player> [uuid] |
Alias for addperm | filteredhopper.addperm |
Everyone |
/hopper coop <player> [uuid] |
Alias for addperm | filteredhopper.addperm |
Everyone |
/hopper removeperm <player> [uuid] |
Revoke hopper access | filteredhopper.removeperm |
Everyone |
/hopper untrust <player> [uuid] |
Alias for removeperm | filteredhopper.removeperm |
Everyone |
/hopper uncoop <player> [uuid] |
Alias for removeperm | filteredhopper.removeperm |
Everyone |
/hopper reload |
Reload configuration | filteredhopper.reload |
OP |
Aliases: /hfilter, /hf
| Permission | Description | Default |
|---|---|---|
filteredhopper.admin |
Administrative commands (give, list) | OP |
filteredhopper.use |
Use filtered hoppers | Everyone |
filteredhopper.addperm |
Add permissions | Everyone |
filteredhopper.removeperm |
Remove permissions | Everyone |
filteredhopper.reload |
Reload the plugin | OP |
filteredhopper.* |
All permissions | OP |
- Get a Filtered Hopper: Use
/hopper give <player> [amount](requires OP) - Place the Hopper: Place it like a normal hopper
- Configure Filters: Shift + Right-click on the hopper to open the filter GUI
- Add Items: Put items in the GUI that you want the hopper to filter
- Save: Close the GUI to save your configuration
You can grant other players access to your filtered hoppers:
- Grant access to all your hoppers:
/hopper addperm <player>or/hopper trust <player>or/hopper coop <player> - Grant access to a specific hopper:
/hopper addperm <player> <uuid>or/hopper trust <player> <uuid>or/hopper coop <player> <uuid> - Revoke access:
/hopper removeperm <player> [uuid]or/hopper untrust <player> [uuid]or/hopper uncoop <player> [uuid]
If you have SuperiorSkyblock2 installed on your server, FilteredHopper can automatically share filtered hoppers with your island members:
-
Automatic Sharing: When you place a filtered hopper, all your island members can automatically:
- Place and break hoppers
- Modify filters via GUI
- Collect hoppers
- Move hoppers in inventory
-
Configuration: Integration can be enabled/disabled in
config.yml:integrations: superiorskyblock: enabled: true share-with-island-members: true
-
Note: This feature only works if SuperiorSkyblock2 is installed on the server. If not present, the plugin will work normally without this feature.
language: en_us # Plugin language (en_us, it_it)
debug:
enabled: false # Enable debug logging
# Configurable limits
limits:
max-hoppers-per-player: -1 # Maximum number of hoppers per player (-1 = unlimited)
max-hoppers-per-chunk: -1 # Maximum number of hoppers per chunk (-1 = unlimited)
# Database backup configuration
database:
auto-backup: true # Enable automatic backups
backup-interval-hours: 24 # Interval between backups (in hours)
max-backups: 7 # Maximum number of backups to keep
# Integrations configuration
integrations:
superiorskyblock:
enabled: true # Enable/disable SuperiorSkyblock2 integration
share-with-island-members: true # Allow island members to interact with filtered hoppersThe plugin supports multiple languages. Currently included:
- ๐บ๐ธ English (
en_us) - ๐ฎ๐น Italian (
it_it)
You can select the language in the config.yml file. You can customise any message in the lang.yml file.
FilteredHopper/
โโโ src/main/java/com/franchino961/filteredhopper/
โ โโโ Main.java # Main plugin class
โ โโโ api/
โ โ โโโ FilteredHopperAPI.java # Public API for developers
โ โโโ commands/
โ โ โโโ HopperCommand.java # /hopper command management
โ โโโ gui/
โ โ โโโ HopperChestGUI.java # Filter graphical interface
โ โโโ listeners/
โ โ โโโ HopperListener.java # Hopper events (place/break)
โ โ โโโ HopperChestGuiListener.java # Filter GUI events
โ โ โโโ InventoryListener.java # Inventory events
โ โ โโโ GameModeChangeListener.java # Game mode change
โ โ โโโ ClearCommandListener.java # Creative inventory clearing
โ โโโ managers/
โ โ โโโ DatabaseManager.java # SQLite database management
โ โ โโโ DatabaseBackupManager.java # Automatic backup system
โ โ โโโ ChunkHopperManager.java # Chunk hopper cache
โ โ โโโ IslandManager.java # SuperiorSkyblock2 integration
โ โ โโโ MessageManager.java # i18n message system
โ โ โโโ SoundManager.java # Sound effects
โ โโโ utils/
โ โโโ HopperUtils.java # Filtered hopper utilities
โ โโโ InventoryUtils.java # Inventory utilities
โ โโโ Logger.java # Logging system
โ โโโ ServerUtils.java # Server utilities
โโโ src/main/resources/
โ โโโ plugin.yml # Plugin metadata
โ โโโ config.yml # Main configuration
โ โโโ lang.yml # Translations (en_us, it_it)
โโโ pom.xml # Maven configuration
โโโ README.md # This file
Main (Plugin Entry Point)
โโโ DatabaseManager (SQLite Persistence)
โโโ ChunkHopperManager (Performance Cache)
โโโ IslandManager (SuperiorSkyblock2 Integration)
โโโ MessageManager (i18n System)
โโโ SoundManager (Audio Feedback)
Event Flow:
Player Action โ Listener โ Manager โ Database โ Cache Update
1. Filtered Hopper Placement
1. Player places hopper โ HopperListener.onBlockPlace
2. Check: Is it a filtered hopper? (HopperUtils.isFilteredHopper)
3. Permission check (owner or admin or island member)
4. Database save โ DatabaseManager.insertFilteredHopper
5. Cache update โ ChunkHopperManager.addFilteredHopper
6. Audio/visual feedback โ SoundManager
2. Filter Configuration
1. Player Shift + Right-click โ HopperListener.onPlayerInteract
2. Hopper access permission check
3. Open GUI โ HopperChestGUI.openGUI
4. Player adds/removes filter items
5. Close GUI โ HopperChestGuiListener.onInventoryClose
6. Configuration save โ DatabaseManager.updateFilteredHopper
7. Chunk cache update
3. Item Filtering
1. Item enters hopper โ HopperListener.onHopperPickup
2. Check: Is filtered hopper? (chunk cache)
3. Load filter configuration from database
4. Check item match with configured filters
5. Allow/Block item collection
4. Permission Sharing
1. Owner executes /hopper addperm <player>
2. Validate hopper UUID and target player
3. Insert permission โ DatabaseManager.addHopperPermission
4. Target can now interact with shared hopper
5. SuperiorSkyblock2 Integration
1. Player interacts with hopper
2. IslandManager.canAccessHopper checks:
- Is player owner? โ
- Does player have explicit permission? โ
- Is player member of same island as owner? โ
3. Access granted/denied
SQLite Database (plugins/FilteredHopper/data.db)
-- Filtered hoppers table
CREATE TABLE filtered_hoppers (
world TEXT NOT NULL,
x INTEGER NOT NULL,
y INTEGER NOT NULL,
z INTEGER NOT NULL,
owner_uuid TEXT NOT NULL,
filter_config TEXT, -- JSON serialised filter items
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (world, x, y, z)
);
-- Shared permissions table
CREATE TABLE hopper_permissions (
hopper_uuid TEXT NOT NULL,
player_uuid TEXT NOT NULL,
granted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (hopper_uuid, player_uuid)
);
-- Creative mode tracking table
CREATE TABLE creative_hoppers (
player_uuid TEXT NOT NULL,
hopper_uuid TEXT NOT NULL,
picked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (player_uuid, hopper_uuid)
);Example filter configuration:
filter_config: |
[
{"type":"DIAMOND","amount":1},
{"type":"EMERALD","amount":1},
{"type":"IRON_INGOT","amount":1}
]- Chunk Cache: Hoppers are indexed per chunk (ChunkHopperManager)
- Lazy Loading: Filters are loaded only when needed
- Prepared Statements: All SQL queries use prepared statements
- Event Cancellation: Events cancelled immediately if not concerning filtered hoppers
Goal: Create a farm that collects only valuable items from mobs
Setup:
- Build mob farm with collection hopper
- Get filtered hopper:
/hopper give Player 1 - Place filtered hopper under collection point
- Shift + Right-click to open filter GUI
- Add to GUI:
ENDER_PEARL(Enderman)BLAZE_ROD(Blaze)WITHER_SKELETON_SKULL(Wither Skeleton)GHAST_TEAR(Ghast)
Result: Hopper collects only rare items, ignoring rotten flesh, bones, etc.
Goal: Team of players manages item sorting system
Configuration:
# Player "Boss" is the owner
# Team members: Worker1, Worker2, Worker3Commands:
# Boss creates 3 filtered hoppers
/hopper give Boss 3
# Boss shares access with all members
/hopper trust Worker1
/hopper trust Worker2
/hopper trust Worker3
# Or using SuperiorSkyblock style aliases:
/hopper coop Worker1
/hopper coop Worker2
/hopper coop Worker3Hopper Setup:
- Hopper 1 (Minerals): DIAMOND, EMERALD, GOLD_INGOT, IRON_INGOT
- Hopper 2 (Farming): WHEAT, CARROT, POTATO, BEETROOT
- Hopper 3 (Mob Drops): BONE, GUNPOWDER, STRING, SPIDER_EYE
Result: All members can configure and manage shared hoppers
Scenario: Skyblock island with 5 members
Configuration:
# config.yml
integrations:
superiorskyblock:
enabled: true
share-with-island-members: trueWorkflow:
- Island leader places 10 filtered hoppers at various points
- Automatically all 5 members can:
- Break and replace hoppers
- Modify filters via GUI
- Collect hoppers in inventory
- If a member leaves the island, they immediately lose access
Advantages:
- โ
No
/hopper trustcommands needed - โ Automatic member management
- โ Security: only island members access
FilteredHopper provides a public API that allows other plugins to interact with filtered hoppers.
import com.franchino961.filteredhopper.Main;
import com.franchino961.filteredhopper.api.FilteredHopperAPI;
import org.bukkit.plugin.Plugin;
// In your plugin
Plugin filteredHopperPlugin = Bukkit.getPluginManager().getPlugin("FilteredHopper");
if (filteredHopperPlugin != null && filteredHopperPlugin instanceof Main) {
FilteredHopperAPI api = ((Main) filteredHopperPlugin).getAPI();
// Use the API
}// Check if an ItemStack is a filtered hopper
boolean isFiltered = api.isFilteredHopper(itemStack);
// Check if a block is a filtered hopper
boolean isFilteredBlock = api.isFilteredHopperBlock(location);// Get hopper owner
String ownerUUID = api.getHopperOwner(location);
// Get hopper UUID
String hopperUUID = api.getHopperUUID(location);// Add permission for specific hopper
boolean success = api.addHopperPermission(ownerUUID, permittedUUID, hopperUUID);
// Add permission for all owner's hoppers
boolean success = api.addHopperPermission(ownerUUID, permittedUUID, null);
// Remove permission
boolean success = api.removeHopperPermission(ownerUUID, permittedUUID, hopperUUID);
// Check if player has permission
boolean hasPermission = api.hasHopperPermission(ownerUUID, permittedUUID, hopperUUID);// Create a new filtered hopper
ItemStack filteredHopper = api.createFilteredHopper();
// Count hoppers by owner
int count = api.countHoppersByOwner(playerUUID);
// Count hoppers in a chunk
int count = api.countHoppersInChunk(worldName, chunkX, chunkZ);import com.franchino961.filteredhopper.api.FilteredHopperAPI;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class MyPlugin extends JavaPlugin {
private FilteredHopperAPI hopperAPI;
@Override
public void onEnable() {
// Get the API
Plugin fh = Bukkit.getPluginManager().getPlugin("FilteredHopper");
if (fh != null) {
hopperAPI = ((Main) fh).getAPI();
}
}
public void checkPlayerHoppers(Player player) {
String uuid = player.getUniqueId().toString();
// Count how many hoppers the player has
int hopperCount = hopperAPI.countHoppersByOwner(uuid);
player.sendMessage("You have " + hopperCount + " filtered hoppers");
// Check if they can have more (example with limit)
if (hopperCount >= 10) {
player.sendMessage("You've reached the hopper limit!");
} else {
// Give a new hopper
ItemStack newHopper = hopperAPI.createFilteredHopper();
player.getInventory().addItem(newHopper);
}
}
}Scenario: Admin needs to verify and manage problematic hoppers
Useful commands:
# List all hoppers of a player
/hopper list PlayerName
# View global statistics
/hopper stats
# Example stats output:
# === FilteredHopper Statistics ===
# Total Filtered Hoppers: 127
#
# Hoppers by World:
# - world: 89
# - world_nether: 23
# - world_the_end: 15
#
# Top 5 Players by Hopper Count:
# - PlayerName1: 45
# - PlayerName2: 32
# - PlayerName3: 21
# ================================
# Reload configuration
/hopper reloadAdmin Permissions:
- Admins with
filteredhopper.admincan:- โ Break any filtered hopper
- โ Modify any filter configuration
- โ Give hoppers to any player
- โ View complete hopper list
Scenario: Builder wants to test hoppers in creative without duplicating them
Automatic Behaviour:
- Player in Creative breaks filtered hopper
- Hopper is not dropped on ground
- Hopper goes to inventory
- Database tracks hopper in
creative_hoppers - Player switches to Survival
- Plugin automatically removes hopper from inventory
- Message: "Filtered hoppers collected in creative removed"
Anti-exploit protection:
- โ Cannot duplicate hoppers by switching modes
- โ Cannot keep hoppers collected in creative
- โ Completely automatic system
Problem: Hoppers don't filter items
- Make sure the hopper is a Filtered Hopper (green name)
- Verify you've configured the filter (Shift + Right-click)
- Verify you have
filteredhopper.usepermission
Problem: Can't break/place filtered hoppers
- Check ownership with
/hopper list - Make sure you have permission from the owner
Problem: Database errors at startup
- Check file permissions on
plugins/FilteredHopperfolder - Make sure SQLite JDBC driver is included (should be integrated in JAR)
Enable debug logging in config.yml:
debug:
enabled: trueThis will provide detailed logs in the console.
This project is released under the MIT license โ see the LICENSE file for details.
Franchino961 โ GitHub
Contributions are welcome!
- ๐ Report bugs in issues
- ๐ก Propose new features
- ๐ง Submit Pull Requests
For bug reports, feature requests, or questions:
- ๐ Open an issue on GitHub
- ๐ก Use the comments section on the project page
- ๐ Spigot API Documentation
- ๐๏ธ SuperiorSkyblock2 Wiki
- ๐พ SQLite JDBC Driver
- ๐ฎ Minecraft Wiki - Hopper
- ๐ง Paper MC - Recommended optimised server
Made with โค๏ธ for the Spigot/Paper community!