core.items.GenericItem.getCommandOptions() - simplify (#5583)

This commit is contained in:
Дилян Палаузов
2026-05-18 13:04:29 +02:00
committed by GitHub
parent 771986b233
commit 2d435db21a
@@ -580,10 +580,7 @@ public abstract class GenericItem implements ActiveItem {
protected @Nullable CommandDescription getCommandOptions(@Nullable Locale locale) {
if (commandDescriptionService instanceof CommandDescriptionService service) {
CommandDescription commandDescription = service.getCommandDescription(this.name, locale);
if (commandDescription != null) {
return commandDescription;
}
return service.getCommandDescription(this.name, locale);
}
return null;