Player player =Bukkit.getPlayer("player");Context<Player> context =Context.player(player);// You can create it with null, but please be careful not to use it in any place // where a player is needed, such as checking permissions, sending messagesContext<Player> context =Context.player(null);
Get plugin instance
BukkitCustomFishingPlugin api =BukkitCustomFishingPlugin.getInstance()
// There are three stages in total
// CAST: Determines what fishing mechanics are available (such as lava fishing)
// LOOT: Affects the weight of the next loot
// FISHING: Determines loot-related properties, such as size, score, and game difficulty
modifier.apply(effect, FishingEffectApplyEvent.Stage.CAST, context);
Get the loot at a certain location
context.arg(ContextKeys.LOCATION, player.getLocation()); // sets the player location
context.arg(ContextKeys.OTHER_LOCATION, custom_location); // sets the custom location, in most cases, it's the hook's
context.arg(ContextKeys.SURROUNDING, "water");
Loot loot = api.getLootManager().getNextLoot(effect, context);