Skip to content

Comments

Add admin interface GUI (PR #65)#66

Merged
tastybento merged 24 commits intodevelopfrom
feature/admin-interface
Feb 22, 2026
Merged

Add admin interface GUI (PR #65)#66
tastybento merged 24 commits intodevelopfrom
feature/admin-interface

Conversation

@tastybento
Copy link
Member

Summary

  • Merges the AdminInterface branch (PR Admin interface #65, closes Rework Admin upgrade #37) into develop, resolving all conflicts
  • Adds a GUI-based admin panel accessible via /[gamemode] admin upgrades
  • Introduces a database-backed upgrade/tier management system alongside the existing config-based approach
  • Adds a Price/Reward plugin architecture for future extensibility

What's new

  • Admin GUI panels: AdminPanel, EditUpgradePanel, EditTierPanel, ListUpgradeDataPanel, ListUpgradeTierPanel, YesNoPanel
  • AdminCommand: hooked into each GameMode's admin command
  • UpgradesDataManager: stores upgrade definitions (UpgradeData, UpgradeTier) in the BentoBox database
  • ChatInput: utility for in-game text input prompts used by admin panels
  • JoinPermCheckListener: cleaner replacement for the previously commented-out limits permission listener
  • UpgradeAPI: renamed from Upgrade as the base class for all upgrade types
  • Updated en-US.yml with all admin UI locale keys

Conflict resolution notes

  • Kept current pom.xml dependency versions (Java 21, Paper 1.21.11, BentoBox 3.0.0-SNAPSHOT)
  • Preserved bug fix Fix CommandUpgrade permission check using wrong data key #64 in CommandUpgrade.isShowed (getName() not cmdId)
  • Kept HEAD's Limits 1.19.1-SNAPSHOT API in BlockLimitsUpgrade.doUpgrade
  • Kept HEAD's Level API in UpgradesManager.getIslandLevel
  • Fixed com.mongodb.lang annotations → org.eclipse.jdt.annotation
  • Eagerly initialised upgrade/upgradesCache fields to keep existing tests passing

Test plan

  • Build passes (mvn clean package) — all 70+ tests green
  • Deploy JAR to server and test /[gamemode] upgrades (player panel still works)
  • Test /[gamemode] admin upgrades opens the admin GUI
  • Create/edit an upgrade via the admin GUI
  • Create/edit a tier via the admin GUI
  • Verify price and reward panels open correctly

🤖 Generated with Claude Code

guillaume-lebegue and others added 24 commits December 15, 2020 00:15
[ADD] Abstract for panel
[ADD] Base for admin panel
[ADD] UpgradesDataManager to manage database
Removed need for a local variable by using a map to boolean.
I think the log line should be shown unconditionally, but it was
indented in a way that made it look like it shouldn't be. I added curly
braces.
Initially this was to avoid the local variable 'vault' being used
because it was shadowing the vault field.
Merged a number of collapsible if statements to increase the code's
readability. Made fields final.
Duplicated string literals make the process of refactoring error-prone,
since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but
only need to be updated in a single place.
It may throw NullPointerException if the value is null.
[ADD] Code Doc in upgradesDataManeger
[ADD] Default values to upgrade data/tier
[WIP] Edit Tier Panel
[WIP] Edit price
[ADD] prices interface
Resolves merge conflicts between develop and the AdminInterface branch
(PR #65, issue #37). Key changes:

- Add admin GUI panels: AdminPanel, EditUpgradePanel, EditTierPanel,
  ListUpgradeDataPanel, ListUpgradeTierPanel, YesNoPanel
- Add AdminCommand hooked into each GameMode's admin command
- Add UpgradesDataManager for database-backed upgrade/tier storage
- Add Price/Reward plugin architecture (IslandLevelPrice, RangeReward)
- Rename Upgrade base class to UpgradeAPI
- Add ChatInput utility for in-game text input prompts
- Add JoinPermCheckListener (replaces commented-out listener)
- Update en-US.yml with admin UI locale keys

Conflict resolution notes:
- Kept current pom.xml dependency versions (Java 21, Paper 1.21, BB 3.0.0)
- Kept HEAD's CommandUpgrade bug fix #64 (use getName() not cmdId in isShowed)
- Kept HEAD's Limits API calls in BlockLimitsUpgrade (compatible with 1.19.1)
- Kept HEAD's Level API in UpgradesManager.getIslandLevel
- Fixed com.mongodb.lang.NonNull imports → org.eclipse.jdt.annotation
- Initialized upgrade/upgradesCache fields eagerly to fix existing tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tastybento tastybento merged commit b771e57 into develop Feb 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework Admin upgrade

1 participant