refactor(i18n): optimize code
This commit is contained in:
parent
f74b6d2f81
commit
00e820735d
31 changed files with 111 additions and 184 deletions
|
@ -1,13 +1,14 @@
|
|||
package xyz.atnrch.nicko.gui;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.gui.items.admin.ManageCacheItem;
|
||||
import xyz.atnrch.nicko.gui.items.admin.ManagePlayerItem;
|
||||
import xyz.atnrch.nicko.gui.items.common.GoBackItem;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.gui.items.common.UnavailableItem;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.xenondevs.invui.gui.Gui;
|
||||
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||
import xyz.xenondevs.invui.window.Window;
|
||||
|
||||
public class AdminGUI {
|
||||
|
@ -21,7 +22,6 @@ public class AdminGUI {
|
|||
|
||||
final HomeGUI parent = new HomeGUI(player);
|
||||
final GoBackItem backItem = new GoBackItem(player);
|
||||
final UnavailableItem unavailableItem = new UnavailableItem(player);
|
||||
final ManagePlayerItem managePlayerItem = new ManagePlayerItem(i18n, player);
|
||||
|
||||
this.gui = Gui.normal()
|
||||
|
@ -32,7 +32,7 @@ public class AdminGUI {
|
|||
)
|
||||
.addIngredient('S', new ManageCacheItem(i18n))
|
||||
.addIngredient('C', managePlayerItem.get())
|
||||
.addIngredient('U', unavailableItem.get())
|
||||
.addIngredient('U', new SimpleItem(ItemDefaults.getUnavailableItem(i18n)))
|
||||
.addIngredient('B', backItem.get(parent.getGUI(), parent.getTitle()))
|
||||
.build();
|
||||
this.player = player;
|
||||
|
|
|
@ -7,7 +7,6 @@ import xyz.atnrch.nicko.gui.items.common.choice.ChoiceCallback;
|
|||
import xyz.atnrch.nicko.gui.items.common.choice.ConfirmItem;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.gui.Gui;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||
|
@ -16,13 +15,14 @@ import xyz.xenondevs.invui.window.Window;
|
|||
public class ChoiceGUI {
|
||||
private final Player player;
|
||||
private final Gui gui;
|
||||
private final String title;
|
||||
|
||||
public ChoiceGUI(Player player, ChoiceCallback callback) {
|
||||
final I18N i18n = new I18N(player);
|
||||
final ConfirmItem confirmItem = new ConfirmItem(player, callback);
|
||||
final CancelItem cancelItem = new CancelItem(player, callback);
|
||||
final ItemTranslation chooseItemTranslation = i18n.translateItem(I18NDict.GUI.Choice.CHOOSE);
|
||||
|
||||
this.title = i18n.translatePrefixless(I18NDict.GUI.Titles.CONFIRM);
|
||||
this.gui = Gui.normal()
|
||||
.setStructure(
|
||||
"@ @ @ @ % & & & &",
|
||||
|
@ -31,12 +31,12 @@ public class ChoiceGUI {
|
|||
)
|
||||
.addIngredient('@', confirmItem.get())
|
||||
.addIngredient('&', cancelItem.get())
|
||||
.addIngredient('I', new SimpleItem(new ItemBuilder(Material.PAPER).setDisplayName(chooseItemTranslation.getName()).get()))
|
||||
.addIngredient('I', new SimpleItem(i18n.translateItem(new ItemBuilder(Material.PAPER), I18NDict.GUI.Choice.CHOOSE)))
|
||||
.build();
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public void open() {
|
||||
Window.single().setGui(gui).setTitle("... > Invalidate > Confirm").open(player);
|
||||
Window.single().setGui(gui).setTitle(title).open(player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package xyz.atnrch.nicko.gui;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.gui.items.common.GoBackItem;
|
||||
import xyz.atnrch.nicko.gui.items.common.UnavailableItem;
|
||||
import xyz.atnrch.nicko.gui.items.settings.BungeeCordCyclingItem;
|
||||
import xyz.atnrch.nicko.gui.items.settings.LanguageCyclingItem;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.xenondevs.invui.gui.Gui;
|
||||
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||
import xyz.xenondevs.invui.window.Window;
|
||||
|
||||
public class SettingsGUI {
|
||||
|
@ -29,7 +30,6 @@ public class SettingsGUI {
|
|||
this.title = i18n.translatePrefixless(I18NDict.GUI.Titles.SETTINGS);
|
||||
|
||||
final HomeGUI parent = new HomeGUI(player);
|
||||
final UnavailableItem unavailableItem = new UnavailableItem(player);
|
||||
final LanguageCyclingItem languageItem = new LanguageCyclingItem(player);
|
||||
final BungeeCordCyclingItem bungeeCordItem = new BungeeCordCyclingItem(player);
|
||||
final GoBackItem backItem = new GoBackItem(player);
|
||||
|
@ -38,7 +38,7 @@ public class SettingsGUI {
|
|||
.setStructure(dynamicStructure)
|
||||
.addIngredient('B', backItem.get(parent.getGUI(), parent.getTitle()))
|
||||
.addIngredient('L', languageItem.get())
|
||||
.addIngredient('U', unavailableItem.get())
|
||||
.addIngredient('U', new SimpleItem(ItemDefaults.getUnavailableItem(i18n)))
|
||||
.addIngredient('T', bungeeCordItem.get())
|
||||
.build();
|
||||
this.player = player;
|
||||
|
|
22
src/main/java/xyz/atnrch/nicko/gui/items/ItemDefaults.java
Normal file
22
src/main/java/xyz/atnrch/nicko/gui/items/ItemDefaults.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package xyz.atnrch.nicko.gui.items;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.xenondevs.invui.item.builder.AbstractItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||
|
||||
public class ItemDefaults {
|
||||
public static AbstractItemBuilder<?> getErrorSkullItem(I18N i18n, String key, Object... args) {
|
||||
// "Missing Value" (Valve's signature missing texture) Texture Value
|
||||
final SkullBuilder.HeadTexture headTexture = new SkullBuilder.HeadTexture("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjNmZTU5YjJhMWQyYmYzMjcwNDA2OGVmYzg2MGM3NWY5MjEyYzIzMTBiNDNkMDdjNGJiYTRiNGViMjM0ZTY4NCJ9fX0=");
|
||||
final SkullBuilder builder = new SkullBuilder(headTexture);
|
||||
return i18n.translateItem(builder, key, args);
|
||||
}
|
||||
|
||||
public static AbstractItemBuilder<?> getUnavailableItem(I18N i18n) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.RED_TERRACOTTA);
|
||||
return i18n.translateItem(builder, I18NDict.GUI.UNAVAILABLE);
|
||||
}
|
||||
}
|
|
@ -7,9 +7,9 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.gui.CacheManagementGUI;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.AsyncItem;
|
||||
|
@ -22,25 +22,15 @@ public class ManageCacheItem extends AsyncItem {
|
|||
public ManageCacheItem(I18N i18n) {
|
||||
super(new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.PAINTING);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.LOADING);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.LOADING);
|
||||
}, (click -> true)).getItemProvider(),
|
||||
() -> {
|
||||
try {
|
||||
final SkullBuilder builder = new SkullBuilder("Notch");
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.MANAGE_CACHE);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Admin.MANAGE_CACHE);
|
||||
} catch (MojangApiUtils.MojangApiException | IOException e) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.ERROR);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
NickoBukkit.getInstance().getLogger().warning("Unable to get Head texture for Notch! (GUI/ManageCache)");
|
||||
return builder;
|
||||
return ItemDefaults.getErrorSkullItem(i18n, I18NDict.GUI.Admin.MANAGE_CACHE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import org.bukkit.entity.Player;
|
|||
import xyz.atnrch.nicko.gui.PlayerCheckGUI;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -21,10 +20,7 @@ public class ManagePlayerItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.WRITABLE_BOOK);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.MANAGE_PLAYER);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Admin.MANAGE_PLAYER);
|
||||
}, click -> {
|
||||
new PlayerCheckGUI(player).open();
|
||||
return true;
|
||||
|
|
|
@ -8,10 +8,10 @@ import org.jetbrains.annotations.NotNull;
|
|||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.gui.ChoiceGUI;
|
||||
import xyz.atnrch.nicko.gui.InvalidateSkinGUI;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.gui.items.common.choice.ChoiceCallback;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.atnrch.nicko.mojang.MojangAPI;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||
|
@ -32,16 +32,10 @@ public class CacheEntryItem extends AsyncItem {
|
|||
final UUID uuidObject = UUID.fromString(dashedUuid);
|
||||
try {
|
||||
final SkullBuilder skull = new SkullBuilder(uuidObject);
|
||||
skull.setDisplayName("§6" + NickoBukkit.getInstance().getMojangAPI().getUUIDName(uuid));
|
||||
skull.addLoreLines("§7Click to invalidate skin");
|
||||
return skull;
|
||||
return i18n.translateItem(skull, I18NDict.GUI.Admin.Cache.ENTRY, NickoBukkit.getInstance().getMojangAPI().getUUIDName(uuid));
|
||||
} catch (MojangApiUtils.MojangApiException | IOException e) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.ERROR);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
NickoBukkit.getInstance().getLogger().warning("Unable to get Head texture for Notch! (GUI/ManageCache)");
|
||||
return builder;
|
||||
NickoBukkit.getInstance().getLogger().warning("Unable to get Head texture for specified UUID (" + uuid + ")! (GUI/Cache/Entry)");
|
||||
return ItemDefaults.getErrorSkullItem(i18n, I18NDict.GUI.Admin.Cache.ENTRY, NickoBukkit.getInstance().getMojangAPI().getUUIDName(uuid));
|
||||
}
|
||||
});
|
||||
this.uuid = uuid;
|
||||
|
|
|
@ -2,13 +2,12 @@ package xyz.atnrch.nicko.gui.items.admin.cache;
|
|||
|
||||
import com.google.common.cache.CacheStats;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.atnrch.nicko.mojang.MojangSkin;
|
||||
import org.bukkit.Material;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -27,14 +26,10 @@ public class CacheStatisticsItem {
|
|||
final LoadingCache<String, Optional<MojangSkin>> cache = NickoBukkit.getInstance().getMojangAPI().getSkinCache();
|
||||
final CacheStats stats = cache.stats();
|
||||
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.Cache.STATISTICS,
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Admin.Cache.STATISTICS,
|
||||
stats.requestCount(),
|
||||
Math.round(cache.size())
|
||||
);
|
||||
// TODO (Ineanto, 9/11/23): This doesn't work.
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
}, (event) -> true);
|
||||
}
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
package xyz.atnrch.nicko.gui.items.admin.cache;
|
||||
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class InvalidateCacheItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.Cache.INVALIDATE_CACHE);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Admin.Cache.INVALIDATE_CACHE);
|
||||
}, (click) -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.bukkit.event.inventory.ClickType;
|
|||
import xyz.atnrch.nicko.gui.InvalidateSkinGUI;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class InvalidateSkinItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.PAPER);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.Cache.INVALIDATE_SKIN);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Admin.Cache.INVALIDATE_SKIN);
|
||||
}, (click) -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -4,9 +4,9 @@ import org.bukkit.Bukkit;
|
|||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.atnrch.nicko.profile.NickoProfile;
|
||||
import xyz.atnrch.nicko.storage.PlayerDataStore;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
|
@ -23,10 +23,7 @@ public class PlayerInformationItem extends AsyncItem {
|
|||
public PlayerInformationItem(I18N i18n, UUID uuid) {
|
||||
super(new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.PAINTING);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.LOADING);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.LOADING);
|
||||
}, (click -> true)).getItemProvider(), () -> {
|
||||
final Player player = Bukkit.getPlayer(uuid);
|
||||
try {
|
||||
|
@ -36,32 +33,19 @@ public class PlayerInformationItem extends AsyncItem {
|
|||
|
||||
if (optionalProfile.isPresent()) {
|
||||
final NickoProfile profile = optionalProfile.get();
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.CHECK,
|
||||
return i18n.translateItem(skull, I18NDict.GUI.Admin.CHECK,
|
||||
player.getName(),
|
||||
(profile.hasData() ? "§a✔" : "§c❌"),
|
||||
(profile.getName() == null ? "§cN/A" : profile.getName()),
|
||||
(profile.getSkin() == null ? "§cN/A" : profile.getSkin()));
|
||||
skull.setDisplayName("§6" + translation.getName());
|
||||
translation.getLore().forEach(skull::addLoreLines);
|
||||
} else {
|
||||
// Default item name in case the profile is not found
|
||||
skull.setDisplayName("§6§lYou should not see this!");
|
||||
skull.addLoreLines(
|
||||
"§cPlease file a bug report",
|
||||
"§cat https://ineanto.xyz/git/ineanto/nicko!"
|
||||
);
|
||||
(profile.getName() == null ? "§7N/A" : profile.getName()),
|
||||
(profile.getSkin() == null ? "§7N/A" : profile.getSkin()));
|
||||
}
|
||||
|
||||
return skull;
|
||||
} catch (MojangApiUtils.MojangApiException | IOException e) {
|
||||
NickoBukkit.getInstance().getLogger().severe("Unable to get head for specified UUID ( " + uuid + ")! (GUI/PlayerCheck)");
|
||||
}
|
||||
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.ERROR);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return ItemDefaults.getErrorSkullItem(i18n, I18NDict.GUI.Admin.CHECK,
|
||||
"§4???", "§cN/A", "§cN/A", "§cN/A"
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package xyz.atnrch.nicko.gui.items.appearance;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class ChangeBothItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TOTEM_OF_UNDYING);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.CHANGE_BOTH);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.CHANGE_BOTH);
|
||||
}, click -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package xyz.atnrch.nicko.gui.items.appearance;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class ChangeNameItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.NAME_TAG);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.CHANGE_NAME);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.CHANGE_NAME);
|
||||
}, click -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package xyz.atnrch.nicko.gui.items.appearance;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.anvil.AnvilManager;
|
||||
import xyz.atnrch.nicko.gui.items.ItemDefaults;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
import xyz.xenondevs.invui.util.MojangApiUtils;
|
||||
|
@ -28,17 +26,10 @@ public class ChangeSkinItem {
|
|||
return new SuppliedItem(() -> {
|
||||
try {
|
||||
final SkullBuilder builder = new SkullBuilder(player.getName());
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.CHANGE_SKIN);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.CHANGE_SKIN);
|
||||
} catch (MojangApiUtils.MojangApiException | IOException e) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.ERROR);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
NickoBukkit.getInstance().getLogger().warning("Unable to get Head texture for specified player (" + player.getName() + ")! (GUI/Home)");
|
||||
return builder;
|
||||
return ItemDefaults.getErrorSkullItem(i18n, I18NDict.GUI.Home.CHANGE_SKIN);
|
||||
}
|
||||
}, click -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.bukkit.Material;
|
|||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.gui.Gui;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
@ -20,9 +19,7 @@ public class GoBackItem {
|
|||
public SuppliedItem get(Gui gui, String parentTitle) {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.ARROW);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.GO_BACK);
|
||||
builder.setDisplayName(translation.getName());
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.GO_BACK);
|
||||
}, click -> {
|
||||
click.getEvent().getView().close();
|
||||
Window.single().setGui(gui).setTitle(parentTitle).open(click.getPlayer());
|
||||
|
|
|
@ -19,8 +19,8 @@ public class ScrollDownItem extends ScrollItem {
|
|||
|
||||
@Override
|
||||
public ItemProvider getItemProvider(ScrollGui gui) {
|
||||
ItemBuilder builder = new ItemBuilder(Material.GREEN_STAINED_GLASS_PANE);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.SCROLL_DOWN);
|
||||
final ItemBuilder builder = new ItemBuilder(Material.GREEN_STAINED_GLASS_PANE);
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.SCROLL_DOWN);
|
||||
builder.setDisplayName(translation.getName());
|
||||
if (!gui.canScroll(1)) translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ScrollUpItem extends ScrollItem {
|
|||
@Override
|
||||
public ItemProvider getItemProvider(ScrollGui gui) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.RED_STAINED_GLASS_PANE);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.SCROLL_UP);
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.SCROLL_UP);
|
||||
builder.setDisplayName(translation.getName());
|
||||
if (!gui.canScroll(-1)) translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
package xyz.atnrch.nicko.gui.items.common;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
public class UnavailableItem {
|
||||
private final I18N i18n;
|
||||
|
||||
public UnavailableItem(Player player) {
|
||||
this.i18n = new I18N(player);
|
||||
}
|
||||
|
||||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.RED_TERRACOTTA);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.UNAVAILABLE);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
}, click -> true);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ import org.bukkit.Material;
|
|||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,9 +19,7 @@ public class CancelItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.RED_STAINED_GLASS_PANE);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Choice.CANCEL);
|
||||
builder.setDisplayName(translation.getName());
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Choice.CANCEL);
|
||||
}, click -> {
|
||||
click.getEvent().getView().close();
|
||||
callback.onCancel();
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.bukkit.Material;
|
|||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,9 +19,7 @@ public class ConfirmItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.GREEN_STAINED_GLASS_PANE);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Choice.CONFIRM);
|
||||
builder.setDisplayName(translation.getName());
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Choice.CONFIRM);
|
||||
}, click -> {
|
||||
click.getEvent().getView().close();
|
||||
callback.onConfirm();
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.bukkit.event.inventory.ClickType;
|
|||
import xyz.atnrch.nicko.gui.AdminGUI;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class AdminAccessItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.COMMAND_BLOCK_MINECART);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.ADMIN);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.ADMIN);
|
||||
}, click -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -19,9 +19,7 @@ public class ExitItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.OAK_DOOR);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.EXIT);
|
||||
builder.setDisplayName(translation.getName());
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.EXIT);
|
||||
}, click -> {
|
||||
click.getEvent().getView().close();
|
||||
final ClickType clickType = click.getClickType();
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.bukkit.event.inventory.ClickType;
|
|||
import xyz.atnrch.nicko.appearance.AppearanceManager;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.atnrch.nicko.profile.NickoProfile;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
@ -23,10 +22,7 @@ public class ResetItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.RESET);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.RESET);
|
||||
}, (event) -> {
|
||||
final Player player = event.getPlayer();
|
||||
final ClickType clickType = event.getClickType();
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package xyz.atnrch.nicko.gui.items.home;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.gui.SettingsGUI;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import xyz.atnrch.nicko.gui.SettingsGUI;
|
||||
import xyz.atnrch.nicko.i18n.I18N;
|
||||
import xyz.atnrch.nicko.i18n.I18NDict;
|
||||
import xyz.atnrch.nicko.i18n.ItemTranslation;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||
|
||||
|
@ -20,10 +19,7 @@ public class SettingsAccessItem {
|
|||
public SuppliedItem get() {
|
||||
return new SuppliedItem(() -> {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.COMPARATOR);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Home.SETTINGS);
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
return builder;
|
||||
return i18n.translateItem(builder, I18NDict.GUI.Home.SETTINGS);
|
||||
}, click -> {
|
||||
final ClickType clickType = click.getClickType();
|
||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||
|
|
|
@ -47,9 +47,9 @@ public class BungeeCordCyclingItem {
|
|||
return new SimpleItem(ItemProvider.EMPTY);
|
||||
}
|
||||
|
||||
private ItemProvider getItemProviderForValue(boolean enabled) {
|
||||
private ItemProvider getItemProviderForValue(boolean ignored) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.COMPASS);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Settings.BUNGEECORD);
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.Settings.BUNGEECORD);
|
||||
|
||||
builder.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(builder::addLoreLines);
|
||||
|
|
|
@ -57,7 +57,7 @@ public class LanguageCyclingItem {
|
|||
|
||||
private ItemProvider generateItem(Locale locale, List<Locale> locales) {
|
||||
final ItemBuilder builder = new ItemBuilder(Material.OAK_SIGN);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Settings.LANGUAGE);
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.Settings.LANGUAGE);
|
||||
|
||||
builder.setDisplayName(translation.getName());
|
||||
for (Locale value : locales) {
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.jsixface.YamlConfig;
|
|||
import org.bukkit.entity.Player;
|
||||
import xyz.atnrch.nicko.NickoBukkit;
|
||||
import xyz.atnrch.nicko.profile.NickoProfile;
|
||||
import xyz.xenondevs.invui.item.builder.AbstractItemBuilder;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -35,7 +36,14 @@ public class I18N {
|
|||
this.yamlConfig = getYamlConfig();
|
||||
}
|
||||
|
||||
public ItemTranslation translateItem(String key, Object... args) {
|
||||
public AbstractItemBuilder<?> translateItem(AbstractItemBuilder<?> item, String key, Object... args) {
|
||||
final ItemTranslation translation = fetchTranslation(key, args);
|
||||
item.setDisplayName(translation.getName());
|
||||
translation.getLore().forEach(item::addLoreLines);
|
||||
return item;
|
||||
}
|
||||
|
||||
public ItemTranslation fetchTranslation(String key, Object... args) {
|
||||
final String nameKey = key + ".name";
|
||||
final String loreKey = key + ".lore";
|
||||
final String name = readString(nameKey);
|
||||
|
|
|
@ -81,6 +81,7 @@ public class I18NDict {
|
|||
public static final String SETTINGS = TITLE_KEY + "settings";
|
||||
public static final String ADMIN = TITLE_KEY + "admin";
|
||||
public static final String CHECK = TITLE_KEY + "check";
|
||||
public static final String CONFIRM = TITLE_KEY + "confirm";
|
||||
public static final String CACHE = TITLE_KEY + "cache";
|
||||
public static final String INVALIDATE_SKIN = TITLE_KEY + "invalidate_skin";
|
||||
}
|
||||
|
@ -124,6 +125,7 @@ public class I18NDict {
|
|||
public static final String STATISTICS = CACHE_KEY + "statistics";
|
||||
public static final String INVALIDATE_CACHE = CACHE_KEY + "invalidate_cache";
|
||||
public static final String INVALIDATE_SKIN = CACHE_KEY + "invalidate_skin";
|
||||
public static final String ENTRY = CACHE_KEY + "entry";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ gui:
|
|||
settings: "Nicko > Settings"
|
||||
admin: "Nicko > Administration"
|
||||
check: "Nicko > Admin... > Check"
|
||||
confirm: "... > Invalidate > Confirm"
|
||||
cache: "Nicko > Admin... > Cache"
|
||||
invalidate_skin: "... > Cache > Invalidate"
|
||||
|
||||
|
@ -47,7 +48,8 @@ gui:
|
|||
error:
|
||||
name: "Error!"
|
||||
lore:
|
||||
- "§7§oAn error occurred."
|
||||
- "§7"
|
||||
- "§7The item texture failed to load, but it might still work."
|
||||
loading:
|
||||
name: "§7§oLoading..."
|
||||
choice:
|
||||
|
@ -94,7 +96,7 @@ gui:
|
|||
lore:
|
||||
- "§7See players' disguise information."
|
||||
check:
|
||||
name: "{0}"
|
||||
name: "§6{0}"
|
||||
lore:
|
||||
- "§cNicked: §a{1}"
|
||||
- "§cName: §6{2}"
|
||||
|
@ -117,6 +119,10 @@ gui:
|
|||
lore:
|
||||
- "§7Select a specific skin to invalidate."
|
||||
- "§7Useful if a skin has been recently updated."
|
||||
entry:
|
||||
name: "§6{0}"
|
||||
lore:
|
||||
- "§7Click to invalidate..."
|
||||
settings:
|
||||
language:
|
||||
name: "Language"
|
||||
|
|
|
@ -33,6 +33,7 @@ gui:
|
|||
settings: "Nicko > Paramètres"
|
||||
admin: "Nicko > Administration"
|
||||
check: "Nicko > Admin... > Vérification"
|
||||
confirm: "... > Invalider > Confirmer"
|
||||
cache: "Nicko > Admin... > Cache"
|
||||
invalidate_skin: "... > Cache > Invalider"
|
||||
|
||||
|
@ -90,7 +91,7 @@ gui:
|
|||
lore:
|
||||
- "§7Vérifiez les informations de déguisement d'un joueur."
|
||||
check:
|
||||
name: "{0}"
|
||||
name: "§6{0}"
|
||||
lore:
|
||||
- "§cDéguisé: §a{1}"
|
||||
- "§cNom: §6{2}"
|
||||
|
@ -115,6 +116,10 @@ gui:
|
|||
- "§7Sélectionnez une apparence spécifique à"
|
||||
- "§7invalider. Utile dans le cas où un skin"
|
||||
- "§7a récemment été mis à jour."
|
||||
entry:
|
||||
name: "§6{0}"
|
||||
lore:
|
||||
- "§7Cliquez pour invalider..."
|
||||
settings:
|
||||
language:
|
||||
name: "Langage"
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ItemTranslationTest {
|
|||
@DisplayName("Translate Item Without Lore")
|
||||
public void translateItemTranslationWithoutLore() {
|
||||
final I18N i18n = new I18N(Locale.FRENCH);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.GO_BACK);
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.GO_BACK);
|
||||
assertTrue(translation.getLore().isEmpty());
|
||||
assertEquals(translation.getName(), "Retour");
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class ItemTranslationTest {
|
|||
@DisplayName("Translate Item")
|
||||
public void translateItemLore() {
|
||||
final I18N i18n = new I18N(Locale.FRENCH);
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.Cache.STATISTICS, "1", "1");
|
||||
final ItemTranslation translation = i18n.fetchTranslation(I18NDict.GUI.Admin.Cache.STATISTICS, "1", "1");
|
||||
assertFalse(translation.getLore().isEmpty());
|
||||
assertEquals("§fNombre de requêtes: §b1", translation.getLore().get(0));
|
||||
assertEquals("§fNb. de skin dans le cache: §b1", translation.getLore().get(1));
|
||||
|
|
Loading…
Reference in a new issue