FoundryAPIThe API Foundry gives an addon when it starts. It provides the plugin, ability registry, ability runner, player assignments, and item data service.
me.that1koda.foundry.apiCode guide
Here is what each type in the Foundry plugin does. Start with the Addon API if you are making an addon.
Open generated API docsTypes addon developers use to make abilities and connect them to players.
FoundryAPIThe API Foundry gives an addon when it starts. It provides the plugin, ability registry, ability runner, player assignments, and item data service.
me.that1koda.foundry.apiFoundryAddonThe required shape of an addon. An addon provides an ID and version, then registers its abilities in onEnable().
me.that1koda.foundry.api.addonAbilityThe required shape of an ability: an ID, an activate() function, and an optional cooldown.
me.that1koda.foundry.api.abilityAbilityContextThe player and ability ID passed to an ability when Foundry runs it.
me.that1koda.foundry.api.abilityAbilityRegistryLets addons register, find, list, and remove abilities.
me.that1koda.foundry.api.abilityAbilityServiceRuns an ability by ID. It returns false if the ability is missing or the player is on cooldown.
me.that1koda.foundry.api.abilityPlayerAbilityServiceSaves which ability a player uses for each click action.
me.that1koda.foundry.api.abilityItemAbilityServiceSaves or reads an ability ID on an item. This does not make the item activate the ability yet.
me.that1koda.foundry.api.abilityActionThe eight supported clicks: left or right, main hand or offhand, while sneaking or not sneaking.
me.that1koda.foundry.api.activationThe classes Foundry uses to load addons and handle abilities.
FoundryThe main Paper plugin. It creates the API, listens for player clicks, and loads addons when the server starts.
me.that1koda.foundry.coreFoundryAPIImplBuilds the API and connects it to the plugin's ability and data services.
me.that1koda.foundry.core.implAbilityRegistryImplKeeps registered abilities in a map, rejects blank or duplicate IDs, and lets the API look them up.
me.that1koda.foundry.core.impl.abilityAbilityServiceImplFinds the requested ability, checks the player's cooldown, runs it, and starts its next cooldown.
me.that1koda.foundry.core.impl.abilityPlayerAbilityServiceImplStores player-to-action ability assignments in each player's saved data.
me.that1koda.foundry.core.impl.abilityItemAbilityServiceImplStores an ability ID in an item's saved data. It only stores the ID; it does not trigger the ability.
me.that1koda.foundry.core.impl.abilityAddonLoaderFinds JAR files in plugins/Foundry/packs, reads each foundry.yml, loads the addon class, and calls onEnable().
me.that1koda.foundry.core.impl.addonLoadedAddonAn internal record holding a loaded addon and the class loader that opened its JAR.
me.that1koda.foundry.core.impl.addon.AddonLoaderFoundryAddonImplWraps a loaded addon and exposes its ID, version, and shutdown callback to the loader.
me.that1koda.foundry.core.impl.addonAbilityActivationListenerChecks player click events for an assigned ability and asks the ability service to run it.
me.that1koda.foundry.core.listenersCooldownManagerKeeps cooldown end times in memory for each player and ability, and can read or clear them.
me.that1koda.foundry.core.utilities