Skip to content

Feature: Custoimizable icons for Companies in GUIs#60

Merged
Hugo1307 merged 4 commits intomainfrom
feature/company-icons
Nov 28, 2025
Merged

Feature: Custoimizable icons for Companies in GUIs#60
Hugo1307 merged 4 commits intomainfrom
feature/company-icons

Conversation

@Hugo1307
Copy link
Owner

This pull request adds support for custom company icons in the Blockstreet plugin, allowing both administrators and players to specify a Bukkit Material as an icon when creating a company. For existing companies, the icons can be changed through the companies' data files.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for customizable company icons in the Blockstreet Minecraft plugin, allowing administrators and players to specify a Bukkit Material as an icon when creating companies. The feature maintains backward compatibility by using the previously hardcoded materials (DIAMOND for investments, EMERALD for companies) as defaults when no custom icon is specified.

  • Added icon field to data model (CompanyDao and CompanyEntity) with proper nullable handling
  • Extended company creation commands to accept an optional Material parameter
  • Created MaterialArgumentParser for validating Material arguments
  • Updated migration to set EMERALD as the default icon for legacy companies

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/dev/hugog/minecraft/blockstreet/data/entities/CompanyEntity.java Added Material icon field to entity model
src/main/java/dev/hugog/minecraft/blockstreet/data/dao/CompanyDao.java Added nullable Material icon field with proper mapping in toEntity/fromEntity methods
src/main/java/dev/hugog/minecraft/blockstreet/data/services/CompaniesService.java Extended createPlayerCompany and createAdminCompany to accept Material icon parameter
src/main/java/dev/hugog/minecraft/blockstreet/ui/items/CompanyItem.java Updated to use custom icon with EMERALD fallback
src/main/java/dev/hugog/minecraft/blockstreet/ui/items/InvestmentItem.java Updated to use custom icon with DIAMOND fallback
src/main/java/dev/hugog/minecraft/blockstreet/commands/CreateCommand.java Added optional icon argument with Material tab completion
src/main/java/dev/hugog/minecraft/blockstreet/commands/AdminCreateCommand.java Added optional icon argument with Material tab completion
src/main/java/dev/hugog/minecraft/blockstreet/commands/validators/MaterialArgumentParser.java New argument parser for validating Bukkit Material values
src/main/java/dev/hugog/minecraft/blockstreet/migration/v110/CompaniesMigrator.java Sets EMERALD as default icon for migrated companies; minor formatting fix
pom.xml Updated invui dependency from version 1.46 to 1.47

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hugo1307 Hugo1307 merged commit 52d85a7 into main Nov 28, 2025
@Hugo1307 Hugo1307 deleted the feature/company-icons branch November 28, 2025 12:05
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.

1 participant