-
Notifications
You must be signed in to change notification settings - Fork 0
API
bwmp edited this page Jun 23, 2023
·
5 revisions
Replace
repositories {
maven {
url = 'https://repo.luminescent.dev/repository/public/'
}
}
dependencies {
implementation 'dev.luminescent:deezitems:$VERSION$'
}<repositories>
<repository>
<id>luminescent-repo</id>
<url>https://repo.luminescent.dev/repository/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.luminescent</groupId>
<artifactId>DeezItems</artifactId>
<version>$VERSION$</version>
<scope>provided</scope>
</dependency>
</dependencies>If you would like an example repository you can clone and build off of you are free to use this template. The template will always be updated to the latest version and example item will be updated with all the newest features
Example items can be found here
To register an item/Rarity
import dev.luminescent.deezitems.DeezItems;
import dev.luminescent.deezitems.manager.ItemManager;
import dev.luminescent.deezitems.utils.ItemRarity;
import org.bukkit.plugin.java.JavaPlugin;
import your.groupid.deezitemsexampleaddon.items.ExampleItem;
public final class DeezItemsAddonTemplate extends JavaPlugin {
@Override
public void onEnable() {
// Plugin startup logic
registerItems();
registerCustomRaritys();
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
public void registerItems() {
ItemManager itemManager = DeezItems.getInstance().getManager(ItemManager.class);
itemManager.registerItem(new ExampleItem());
}
public void registerCustomRaritys() {
// Register custom raritys here
ItemRarity.Raritys.put("Example_Rarity", "#0017ff");
}
}You will need to add depend: [ DeezItems ] in your plugin.yml due to addons requiring the main plugin to function.