-
Notifications
You must be signed in to change notification settings - Fork 14
Addon Integration
Genesis allows developers to extend its functionality via custom addons. You can register new RewardTypes, PriceTypes, Conditions, and even create custom behaviors for shop items.
This page will walk you through how to build and register your own Genesis Addon.
A Genesis addon is simply a Bukkit plugin that hooks into Genesis using the provided API and registration system.
Make sure your plugin.yml includes:
depend: [Genesis]You can use softdepend: if your plugin works without Genesis but adds integration when it's present.
Genesis exposes static registration methods on the GenesisAPI class.
GenesisAPI.get().registerRewardType("myreward", new RewardExecutor() {
@Override
public void giveReward(Player player, ShopItem item, double multiplier) {
player.sendMessage("You got a custom reward!");
}
@Override
public boolean isRewardPossible(Player player, ShopItem item) {
return true;
}
});This makes RewardType: myreward usable in any shop item.
GenesisAPI.get().registerPriceType("myprice", new PriceExecutor() {
@Override
public boolean payPrice(Player player, ShopItem item, double multiplier) {
return player.hasPermission("custom.price.free");
}
@Override
public boolean canAfford(Player player, ShopItem item) {
return player.hasPermission("custom.price.free");
}
});GenesisAPI.get().registerConditionType("customcondition", new ConditionChecker() {
@Override
public boolean isMet(Player player, ShopItem item, String... args) {
return player.getLevel() > 20;
}
});Now you can use:
Condition:
- type:customconditionArguments from the config will be passed in as args.
public class MyGenesisAddon extends JavaPlugin {
@Override
public void onEnable() {
if (getServer().getPluginManager().getPlugin("Genesis") != null) {
registerCustomTypes();
}
}
private void registerCustomTypes() {
GenesisAPI.get().registerRewardType("shout", (player, item, multiplier) -> {
Bukkit.broadcastMessage(player.getName() + " made a purchase!");
});
GenesisAPI.get().registerConditionType("inNether", (player, item, args) -> {
return player.getWorld().getName().equalsIgnoreCase("nether");
});
}
}- You can use Genesis placeholders via
GenesisAPI.get().getVariables().replaceVariables(player, str) - Combine with PlaceholderAPI or LuckPerms for highly dynamic conditions.
- Use item attributes (
item.getMenuItemBuilder()) to change item visuals on the fly.
- Create a test shop using your custom types.
- Use
/bs open <shop>to open and verify behavior. - Check
BugFinder.ymlfor debug info on config issues.
You can package your addon like any Bukkit plugin and distribute it as a .jar.
Optional: Prefix your plugin name with GenesisAddon- for clarity (e.g., GenesisAddon-Teleportation).
-
RewardType: teleportβ Warp players to specific coordinates. -
PriceType: itemtagβ Charge items with a specific NBT tag. -
ConditionType: biomeβ Check if player is in a specific biome. -
RewardType: broadcastβ Send global messages.
Last updated: June 2025