Skip to content

Latest commit

 

History

History
56 lines (49 loc) · 2 KB

File metadata and controls

56 lines (49 loc) · 2 KB

Plugin API

The Plugin API allows our mod to be more compatible with yours, and your mod to be more compatible with ours, with just one simple class!

Maven

Add the OperationPotato Maven repository:

maven {
	url = "https://maven.operationpotato.com/releases"

	content {
		includeGroup "com.operationpotato"
	}
}

Usage

  1. Add to your dependencies:
    compileOnly "com.operationpotato:skyblock-item-list-api:{VERSION}"
    • You can find the latest version number on the Maven here
  2. Create a class that implements the Plugin API
    • registerExclusionZones:
      • Add Exclusion Zones to prevent items from being placed on your screen widgets.
    • registerExcludedScreens:
      • Add Excluded Screens to automatically close the item list on your custom screens.
    • registerHoveredItems:
      • Provide Hovered Items to allow recipes, usages, favorite-ing, and more on them.
      • Receive and Consume Hovered Item key events.
    • registerRecipeButtons
      • Add custom Recipe Buttons to let users do things from recipe screens.
      • Please add a Config option if you do this!
    • See the default plugin for an example implementation.
  3. Add an entrypoint to your class in your fabric.mod.json
    • If your plugin is written in Java:
      "skyblock-item-list": [
        "your.java.class.here"
      ]
    • If your plugin is written in Kotlin, you will need to specify the language adapter:
    "skyblock-item-list": [
      {
        "adapter": "kotlin",
        "value": "your.kotlin.class.here"
      }
    ]
  4. Try it in-game and report any API issues here!