Skip to content
RonanCraft edited this page Jun 13, 2023 · 2 revisions

The AmethystGear API is a fairly powerful tool allowing for expansions to be installed on the fly!

Getting Started

⚠️ Remember to add AmethystGear to your plugin.yml -> depend.

AmethystGear can be installed using the online repository. logs.ronanplugins.com Use the drop down boxes below for the configuration you need.

Maven Setup
...
<repositories>
    <repository>
    <id>ronanplugins-releases</id>
    <name>Ronan Plugins</name>
    <url>https://repo.ronanplugins.com/releases</url>
    </repository>
<repositories>
...
<dependencies>
  <dependency>
    <groupId>me.SuperRonanCraft</groupId>
    <artifactId>AmethystGear</artifactId>
    <version>(version)</version>
    <scope>provided</scope>
  </dependency>
<dependencies>
...

Gradle
...
repositories {
    maven {url "https://repo.ronanplugins.com/releases"}
}
...
dependencies {
    implementation "com.ronanplugins:AmethystGear:(version)"
}
...

Manual Setup

Installing via Maven using Maven Helper in IntelliJ using a New Goal:
install:install-file -Dfile=<path-to-AmethystGear-jar> -DgroupId=com.ronanplugins -DartifactId=AmethystGear -Dversion=(version) -Dpackaging=jar

Creating an Expansion

Lets create a new expansion that allows you to add random gear to the existing Catalog list as an example.
Lets setup your main class:

public class RandomGear extends AmethystExpansion {
    @Override
    public @NotNull String getIdentifier() {
        return "Random Gear";
    }

    @Override
    public @NotNull String getAuthor() {
        return "Your Name";
    }

    @Override
    public @NotNull String getVersion() {
        return "1.0.0";
    }

    @Override
    public void onEnable() {
        //Your startup code
    }

    @Override
    public void onDisable() {
       //Your shutdown code
    }
}

Lets just add some random gear once our expansion is loaded in the onEnable method

    @Override
    public void onEnable() {
        //To easily access systems lets call the HelperSystems class
        String key = "your_unique_catalog_id";
        //Each catalog item must have a unique key/identifier
        HelperSystems.getCatalogLoader().getGearCatalog().put(key, new CatalogInfo(
                new GearBaseInfo(key, element, element_bonus, tier, type, enchants, modelData), item_name, item_lore));
    }

File Configurations


Resources


Other

  • API
  • Expansion Packs (Coming Soon)
Clone this wiki locally