UpgradeableHoppers
DiscordHome
  • Info
  • For Players
    • Commands
  • Configuration
    • Installation
    • Hoppers
    • GUI Menus
    • Messages
    • Translations
  • Permissions
    • Player Commands
    • Admin Commands
    • Other Permissions
  • Developers
    • API
    • ItemStacker
Powered by GitBook
On this page
  • Javadoc
  • API Usage Explained
  • Preventing Item Pickup
  • Just a Specific Item
  • Items in Regions of your Custom Region Plugin
Edit on GitHub
  1. Developers

API

PreviousOther PermissionsNextItemStacker

Last updated 1 month ago

Javadoc

Can be found .

API Usage Explained

Include the API using Gradle:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    compileOnly "com.github.angeschossen:UpgradeableHoppersAPI:version"
}

Replace version with the version that you want to use.

Include the API using Maven:


<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
<dependency>
    <groupId>com.github.angeschossen</groupId>
    <artifactId>UpgradeableHoppersAPI</artifactId>
    <version>version</version>
    <scope>provided</scope>
</dependency>
</dependencies>

Replace version with the version that you want to use.

UpgradeableHoppersAPI api = UpgradeableHoppersAPI.getInstance();

Preventing Item Pickup

Just a Specific Item

If you want to prevent a specific item being picked up by the hoppers, just add the "NO_PICKUP" metadata to the item entity.

Items in Regions of your Custom Region Plugin

Enable the following option in config.yml and listen to the HopperItemPickupEvent. This should be the last resort. If you only want to prevent a specific item from being picked up, use the solution above instead.

  # If enabled, the plugin calls the HopperItemPickupEvent for 3rd party plugins to listen to.
  # That way they can for example cancel the hopper picking up items from an untrusted region.
  call-item-pickup-event: true

The API is accessible through an implementation of the interface. UpgradeableHoppers needs to be loaded before this API can be used. It doesn't need to be enabled though.

UpgradeableHoppersAPI
here