-
Notifications
You must be signed in to change notification settings - Fork 0
API
The AmethystGear API is a fairly powerful tool allowing for expansions to be installed on the fly!
⚠️ Remember to addAmethystGear
to yourplugin.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
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));
}
Chat with us on Discord
Have a Suggestion? Make an issue!
Thank you for viewing the Wiki for AmethystGear!
Did this wiki help you out? Please give it a Star so I know it's getting use!
Check out my other plugins!