Fishing minigame with custom fish, rods, bait, progression, skills, economy & tournaments.
PhoenixFish v1.2.2
This update adds a per-player fishing mode toggle and fixes a large batch of bugs, including several critical ones affecting selling prices, rarity balance, MySQL support and player data safety.
Note
Players can now switch between PhoenixFish custom fishing and vanilla fishing at any time. In vanilla mode the plugin does not touch fishing at all, so real vanilla loot, treasure and enchanted books work as normal.
Important
This release fixes a bug where a failed database read could overwrite a player's saved data with an empty profile. Updating is strongly recommended.
Related: #1
โจ New Feature: Per-Player Fishing Mode Toggle
Players can switch between PhoenixFish custom fishing and vanilla fishing.
Commands
| Command | Description |
|---|---|
/phoenixfish toggle |
Switch your own fishing mode |
/phoenixfish toggle status [player] |
Show current mode and its source (choice / default) |
/phoenixfish toggle <player> |
Admin: toggle another player's mode |
/phoenixfish toggle reset <player> |
Admin: reset a player to the default mode |
Aliases: /pf, /pfish
What vanilla mode means
In vanilla mode a player gets:
- Real vanilla loot, treasure and enchanted books
- No minigame
- No bait consumption
- No records, XP or tournament points
- No level gate on plugin rods
The chosen mode is stored per player in the PersistentDataContainer, so it survives relogs and server restarts.
Configuration
fishing-mode:
enabled: true # master switch for the toggle feature
default-mode: custom # custom | vanilla
require-permission: false # require phoenixfish.toggle
toggle-cooldown: 5 # seconds between toggles
broadcast-change: false # announce mode changes server-wide
Toggle sound: sounds.mode_toggle (default: UI_BUTTON_CLICK)
Permissions
| Permission | Default | Description |
|---|---|---|
phoenixfish.toggle |
true |
Switch your own fishing mode |
phoenixfish.admin |
op |
Bypass the cooldown and manage other players' modes |
๐ด Critical Fixes
- Fish weight now affects the sell price.
MinigameTask.handleWin()only wrote the weight to the item lore, never to thefish_weightPDC key thatEconomyManager.getWeight()reads. Every fish sold at a fallback weight of1.0, so a Leviathan sold for the same as a Sardine. The "base price ร weight" system now works as intended. - MySQL mode no longer crashes on first start. The MySQL driver was missing at runtime, causing a
ClassNotFoundExceptionthat silently disabled the database system. The driver is now available to the plugin. - Fractional rarity weights are no longer reset to zero.
fish.ymlvalues such as Kraken0.35, Leviathan0.05, Void Whale0.01and World Eater0.005were read as integers and truncated to0, then forced to0.001. Legendary fish were roughly 350ร rarer than intended.CustomFish.weightis now adouble. - Fishing no longer locks up when the XP system is disabled. With both XP and discovery disabled,
FishingListener.onInteract()could hit a null cache and cancelled every right-click, so nobody could fish in "fishing-only" mode. The missing guard was added. - Catalog GUI item loss fixed.
- Shift-clicking an item no longer drops it into the shared main menu, where it stayed until a restart.
- Items placed into page menus are no longer deleted when the menu is closed.
- Menus are no longer detected by a fragile title check (
title.contains("Page")), so other plugins' GUIs are no longer affected.
- A database read error no longer wipes player data. A failed
loadData()returned an empty profile that was cached and then autosaved over the real data after 5 minutes. Read failures no longer lead to an overwrite, andSQLiteManager.init()errors are now reported instead of being swallowed.
๐ Other Fixes
Toggle system: vanilla mode edge cases
- Vanilla loot never dropped while a stale minigame was still running.
FishingListener.onFish()now checks vanilla mode first. - "Second cast, bobber stuck in water" bug.
FishingListener.onInteract()no longer cancels the right-click of vanilla players. - Switching to vanilla now cancels any active minigame via the new
cancelActiveMinigameSilently()helper.handleWin()is not called, so no custom fish is awarded. - Race condition guard.
MinigameTask.handleWin()checksisVanillaMode()at the very top. If a player's mode flips between scheduling and execution, no custom fish is awarded and a warning is logged.
Fishing and minigame
- Bait detection is now consistent: the
baitKeyPDC value is read as well, so baits without custom model data work. - When the minigame is disabled (
giveFishDirectly), the weight lore is now added andFishCaughtEventis fired, the same as in the minigame path. - Weight formatting is now consistent across the minigame and direct-catch paths.
- Double catch now gives each fish its own weight instead of two fish stacked with the same weight.
level-luck-bonusdefault in code now matches the value inconfig.yml.
Economy and commands
- Overflow items are dropped at the player's feet instead of disappearing when the inventory is full.
- Fixed incompatible map types that caused a compilation failure.
/pf sell allis now supported.- Vault integration and a
/pf balancecommand were added, so players can see their money. addlevel/addcraftnow use the permission system instead ofisOp(), can target other players, and useMessageManagerkeys.- The
invalid_materialmessage now fills in its%material%placeholder. - Added tab completion, including ID completion for
/pf giverod <id>.
Records and tournaments
- Records were stored per fish species, so even a 0.7 kg Sardine was announced as a new server record. Replaced with a single global weight record (
global.weight). Old per-fish records (server-records.*) migrate automatically on first load. Species records still update silently; only the global record is broadcast. - The server record now stores who holds it, not just the weight.
- A tournament winner who left before the tournament ended no longer breaks rewards: item rewards are given and reward commands now resolve the correct player instead of running as
eco give Unknown Player 1000.
Messages and language files
- The rod level gate message now uses the
rod_level_requiredkey (%level%,%current%placeholders). - All player-visible command messages go through
MessageManagerkeys (messages_tr.yml/messages_en.yml). No hardcoded text remains. - Removed the duplicate
usage_sellkey from both message files. - The
fish_discoveredmessage is now actually shown when a fish is discovered. fish_tr.ymlis now included in the jar, so Turkish fish names display correctly.
API compatibility and build
org.bukkit.block.Biomebecame an interface on Paper 1.21.3+, which causedIncompatibleClassChangeErroron 1.21 servers. Fixed.- The project now compiles against
paper-api1.21-R0.1-SNAPSHOT, the oldest supported version, so the jar runs on 1.21 and newer. - The open-ended
paper.versionrange was removed, so builds are reproducible. - Cleaned up the unused local
CraftAPIinterface, which did not match the reflection call. - Fixed a duplicate
main.java.com...package declaration inFishingModeManager.java. Correct package:com.phoenix.fish.manager.