refactor: shorter name

This commit is contained in:
ineanto 2025-09-22 16:19:17 +02:00
parent 769fb97500
commit 29afcdc276
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ import xyz.ineanto.nicko.gui.items.common.GoBackItem;
import xyz.ineanto.nicko.gui.items.common.ScrollDownItem; import xyz.ineanto.nicko.gui.items.common.ScrollDownItem;
import xyz.ineanto.nicko.gui.items.common.ScrollUpItem; import xyz.ineanto.nicko.gui.items.common.ScrollUpItem;
import xyz.ineanto.nicko.gui.items.favorites.FavoriteAddItem; import xyz.ineanto.nicko.gui.items.favorites.FavoriteAddItem;
import xyz.ineanto.nicko.gui.items.favorites.FavoriteAppearanceEntryItem; import xyz.ineanto.nicko.gui.items.favorites.FavoriteAppearanceItem;
import xyz.ineanto.nicko.language.LanguageKey; import xyz.ineanto.nicko.language.LanguageKey;
import xyz.ineanto.nicko.language.PlayerLanguage; import xyz.ineanto.nicko.language.PlayerLanguage;
import xyz.ineanto.nicko.profile.NickoProfile; import xyz.ineanto.nicko.profile.NickoProfile;
@ -45,7 +45,7 @@ public class FavoritesGUI {
items = Collections.emptyList(); items = Collections.emptyList();
} else { } else {
items = favorites.stream() items = favorites.stream()
.map((appearance) -> new FavoriteAppearanceEntryItem(playerLanguage, appearance)) .map((appearance) -> new FavoriteAppearanceItem(playerLanguage, appearance))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }

View file

@ -22,13 +22,13 @@ import xyz.xenondevs.invui.item.impl.SuppliedItem;
import java.util.List; import java.util.List;
public class FavoriteAppearanceEntryItem extends AsyncItem { public class FavoriteAppearanceItem extends AsyncItem {
private final PlayerDataStore dataStore = Nicko.getInstance().getDataStore(); private final PlayerDataStore dataStore = Nicko.getInstance().getDataStore();
private final PlayerLanguage playerLanguage; private final PlayerLanguage playerLanguage;
private final Appearance appearance; private final Appearance appearance;
public FavoriteAppearanceEntryItem(PlayerLanguage playerLanguage, Appearance appearance) { public FavoriteAppearanceItem(PlayerLanguage playerLanguage, Appearance appearance) {
super(new SuppliedItem(() -> { super(new SuppliedItem(() -> {
final ItemBuilder builder = new ItemBuilder(Material.PAINTING); final ItemBuilder builder = new ItemBuilder(Material.PAINTING);
return playerLanguage.translateItem(builder, LanguageKey.GUI.LOADING); return playerLanguage.translateItem(builder, LanguageKey.GUI.LOADING);