SamsCreations
SamsCreations

The API is public on GitHub: Sam1qkk/SamsFishing-API.

repositories { maven { url = 'https://jitpack.io' } }
dependencies { compileOnly 'com.github.Sam1qkk:SamsFishing-API:1.1.0' }
SamsFishingAPI fishing = SamsFishingProvider.get();   // null without SamsFishing
fishing.addXp(player, 50);
ItemStack pike = fishing.createCatch("pike", 92.5, player);
fishing.addPearls(player, 500);
MethodsFor
catchIds, createCatch, catchId, catchSize, rarity, worthFish
gearIds, createGear, gearIdRods, baits, hooks, lines, totems
totalCaught, speciesCaught, personalBestRecords
level, xp, addXpFishing levels
pearls, addPearls, takePearlsPearls
skillPoints, skillLevelSkill tree
runningEvents, partyMembersSeasonal events, parties
runningCompetition, startCompetitionCompetitions
EventWhen
FishHookedEventA fish bites, before the minigame (cancellable)
FishCaughtEventA fish was landed
FishEatenEventA fish was eaten
SeaCreatureKilledEventA sea creature was beaten
FishingLevelUpEventA new fishing level
CompetitionStartEvent, CompetitionEndEventA competition starts or ends

Addons

An addon is a jar in plugins/SamsFishing/addons/. SamsFishing loads it on startup (before the resource pack is built, so it can add files to it), calls reload() on /fishing reload and disable() on shutdown. Addons use SamsFishing for listeners, tasks and data, so they need no plugin.yml.

# addon.yml
name: MyAddon
version: '1.0.0'
main: com.example.myaddon.MyAddon
public final class MyAddon implements SamsFishingAddon {
 
    @Override
    public void enable(SamsFishing plugin) {
        plugin.getServer().getPluginManager().registerEvents(new MyListener(plugin), plugin);
        // add files to every resource pack SamsFishing builds:
        plugin.packBuilder().addContributor(root -> { /* write into root */ });
    }
 
    @Override
    public void disable() {
    }
}

Compile against the SamsFishing jar (compileOnly). Each addon gets its own class loader whose parent is SamsFishing's, so it sees SamsFishing and Paper but not other addons.