VHOPPERS API
Methods
Public API methods for hopper lookup, snapshots, limits, storage backend information, module item access, and module toggling.
Available Methods
| Method | Returns | Description |
|---|---|---|
getHopper(Location location) | Optional<VHopper> | Returns a read-only snapshot of the VHopper at that block location. |
getHoppers() | Collection<VHopper> | Returns snapshots for every loaded VHopper. |
isVHopper(Location location) | boolean | Cheap existence check for a VHopper location. |
getPlacedHopperCount() | int | Returns the current count of placed VHoppers. |
getHopperLimit(Player player) | int | Returns the player's effective limit, including permission limits. |
getStorageBackend() | String | Returns the active backend name such as LOCAL, MYSQL, MARIADB, or H2. |
getModuleItem(Location location, int slot) | Optional<ItemStack> | Returns a cloned module item from the requested slot. |
setModuleEnabled(Location location, int slot, boolean enabled) | CompletableFuture<Boolean> | Toggles a module through the Folia-safe hopper location scheduler. |
Snapshot Objects
VHopper:
Location location();
UUID owner();
Map<UUID, VHopperTrustedAccess> trustedPlayers();
Map<String, Integer> upgrades();
List<VHopperModule> modules();
VHopperStats stats();
VHopperModule:
int slot();
String type();
boolean enabled();
ItemStack item();
VHopperStats:
long collectedItems();
long movedItems();
long soldItems();
double earnedMoney();
long lastActiveAt();
String lastStatus();
Map<String, Long> moduleActivity();
VHopperTrustedAccess:
boolean canUpgrade();
boolean canModuleInsert();
boolean canModuleRemove();
boolean canPickup();Developer Events
VHopperPlaceEventVHopperPickupEventVHopperModuleInstallEventVHopperModuleRemoveEventVHopperModuleToggleEventVHopperUpgradeEventVHopperCollectEventVHopperMoveEventVHopperSellEvent