The /bounty set command crashed because getEcoHook() returned null and code attempted to call takeEco(...) on it, causing an NPE. The plugin must always use DiamondBank-OG for economy operations rather than relying on an uninitialized hook.
Description
Assign the created DiamondBankOGHook instance to the plugin field this.ecoHook inside registerDefaultEcoHooks() so command handlers use DiamondBank-OG for economy operations by default (PlayerBountiesOG#registerDefaultEcoHooks).
Add a defensive guard in getEcoHook() that throws an explicit IllegalStateException when the economy hook is not initialized to fail fast with a clear message (PlayerBountiesOG#getEcoHook).
Changes are in src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.java and do not modify other command logic.
Testing
Attempted to run ./gradlew build in this environment; the build failed here with What went wrong: 25.0.1, so full Gradle validation could not be completed.
### Motivation
- The `/bounty set` command crashed because `getEcoHook()` returned `null` and code attempted to call `takeEco(...)` on it, causing an NPE. The plugin must always use DiamondBank-OG for economy operations rather than relying on an uninitialized hook.
### Description
- Assign the created `DiamondBankOGHook` instance to the plugin field `this.ecoHook` inside `registerDefaultEcoHooks()` so command handlers use DiamondBank-OG for economy operations by default (`PlayerBountiesOG#registerDefaultEcoHooks`).
- Add a defensive guard in `getEcoHook()` that throws an explicit `IllegalStateException` when the economy hook is not initialized to fail fast with a clear message (`PlayerBountiesOG#getEcoHook`).
- Changes are in `src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.java` and do not modify other command logic.
### Testing
- Attempted to run `./gradlew build` in this environment; the build failed here with `What went wrong: 25.0.1`, so full Gradle validation could not be completed.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69a824341d18832f85558dd9d1d94892)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
/bounty setcommand crashed becausegetEcoHook()returnednulland code attempted to calltakeEco(...)on it, causing an NPE. The plugin must always use DiamondBank-OG for economy operations rather than relying on an uninitialized hook.Description
DiamondBankOGHookinstance to the plugin fieldthis.ecoHookinsideregisterDefaultEcoHooks()so command handlers use DiamondBank-OG for economy operations by default (PlayerBountiesOG#registerDefaultEcoHooks).getEcoHook()that throws an explicitIllegalStateExceptionwhen the economy hook is not initialized to fail fast with a clear message (PlayerBountiesOG#getEcoHook).src/main/java/com/tcoded/playerbountiesplus/PlayerBountiesOG.javaand do not modify other command logic.Testing
./gradlew buildin this environment; the build failed here withWhat went wrong: 25.0.1, so full Gradle validation could not be completed.Codex Task