Skip to content

Commit

Permalink
Merge pull request #15 from Tweetzy/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
kiranhart authored Jan 25, 2023
2 parents 390d9ef + 720985d commit 30dc913
Show file tree
Hide file tree
Showing 21 changed files with 356 additions and 486 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<artifactId>skulls</artifactId>

<name>Skulls</name>
<version>3.7.0</version>
<version>3.8.0</version>
<packaging>jar</packaging>

<properties>
<author>Kiran Hart</author>
<jarName>Skulls</jarName>
<main.class>${project.groupId}.${project.artifactId}.${project.name}</main.class>
<java.version>1.8</java.version>
<flight.version>3.8.0</flight.version>
<flight.version>3.10.0</flight.version>
<flight.path>ca.tweetzy</flight.path>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ca/tweetzy/skulls/Skulls.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import ca.tweetzy.skulls.manager.EconomyManager;
import ca.tweetzy.skulls.manager.PlayerManager;
import ca.tweetzy.skulls.manager.SkullManager;
import ca.tweetzy.skulls.settings.Locale;
import ca.tweetzy.skulls.settings.Settings;
import ca.tweetzy.skulls.settings.Translations;

/**
* Date Created: April 04 2022
Expand Down Expand Up @@ -69,7 +69,7 @@ public final class Skulls extends FlightPlugin {
protected void onFlight() {
// settings and locale setup
Settings.setup();
Locale.setup();
Translations.init();

Common.setPrefix(Settings.PREFIX.getString());

Expand Down
24 changes: 13 additions & 11 deletions src/main/java/ca/tweetzy/skulls/api/enums/BaseCategory.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

package ca.tweetzy.skulls.api.enums;


import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.skulls.settings.Settings;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import lombok.AllArgsConstructor;
import lombok.Getter;

Expand All @@ -33,16 +35,16 @@
@Getter
public enum BaseCategory {

ALPHABET("alphabet", Translation.ALPHABET.getString(), Settings.DEFAULT_PRICES_ALPHABET.getDouble(), 164, Settings.GUI_MAIN_ITEMS_ALPHABET_SLOT.getInt(), Settings.CATEGORIES_ALPHABET_ENABLED.getBoolean()),
ANIMALS("animals", Translation.ANIMALS.getString(), Settings.DEFAULT_PRICES_ANIMALS.getDouble(), 26960, Settings.GUI_MAIN_ITEMS_ANIMALS_SLOT.getInt(), Settings.CATEGORIES_ANIMALS_ENABLED.getBoolean()),
BLOCKS("blocks", Translation.BLOCKS.getString(), Settings.DEFAULT_PRICES_BLOCKS.getDouble(), 24064, Settings.GUI_MAIN_ITEMS_BLOCKS_SLOT.getInt(), Settings.CATEGORIES_BLOCKS_ENABLED.getBoolean()),
DECORATION("decoration", Translation.DECORATION.getString(), Settings.DEFAULT_PRICES_DECORATION.getDouble(), 46908, Settings.GUI_MAIN_ITEMS_DECORATION_SLOT.getInt(), Settings.CATEGORIES_DECORATION_ENABLED.getBoolean()),
FOOD_AND_DRINKS("food & drinks", Translation.FOOD_AND_DRINKS.getString(), Settings.DEFAULT_PRICES_FOOD_AND_DRINKS.getDouble(), 2686, Settings.GUI_MAIN_ITEMS_FOOD_AND_DRINKS_SLOT.getInt(), Settings.CATEGORIES_FOOD_AND_DRINKS_ENABLED.getBoolean()),
HUMANS("humans", Translation.HUMANS.getString(), Settings.DEFAULT_PRICES_HUMANS.getDouble(), 47833, Settings.GUI_MAIN_ITEMS_HUMANS_SLOT.getInt(), Settings.CATEGORIES_HUMANS_ENABLED.getBoolean()),
HUMANOID("humanoid", Translation.HUMANOID.getString(), Settings.DEFAULT_PRICES_HUMANOID.getDouble(), 46664, Settings.GUI_MAIN_ITEMS_HUMANOID_SLOT.getInt(), Settings.CATEGORIES_HUMANOID_ENABLED.getBoolean()),
MISCELLANEOUS("miscellaneous", Translation.MISC.getString(), Settings.DEFAULT_PRICES_MISC.getDouble(), 45534, Settings.GUI_MAIN_ITEMS_MISC_SLOT.getInt(), Settings.CATEGORIES_MISC_ENABLED.getBoolean()),
MONSTERS("monsters", Translation.MONSTERS.getString(), Settings.DEFAULT_PRICES_MONSTERS.getDouble(), 47778, Settings.GUI_MAIN_ITEMS_MONSTERS_SLOT.getInt(), Settings.CATEGORIES_MONSTERS_ENABLED.getBoolean()),
PLANTS("plants", Translation.PLANTS.getString(), Settings.DEFAULT_PRICES_PLANTS.getDouble(), 44334, Settings.GUI_MAIN_ITEMS_PLANTS_SLOT.getInt(), Settings.CATEGORIES_PLANTS_ENABLED.getBoolean());
ALPHABET("alphabet", TranslationManager.string(Translations.ALPHABET), Settings.DEFAULT_PRICES_ALPHABET.getDouble(), 164, Settings.GUI_MAIN_ITEMS_ALPHABET_SLOT.getInt(), Settings.CATEGORIES_ALPHABET_ENABLED.getBoolean()),
ANIMALS("animals", TranslationManager.string(Translations.ANIMALS), Settings.DEFAULT_PRICES_ANIMALS.getDouble(), 26960, Settings.GUI_MAIN_ITEMS_ANIMALS_SLOT.getInt(), Settings.CATEGORIES_ANIMALS_ENABLED.getBoolean()),
BLOCKS("blocks", TranslationManager.string(Translations.BLOCKS), Settings.DEFAULT_PRICES_BLOCKS.getDouble(), 24064, Settings.GUI_MAIN_ITEMS_BLOCKS_SLOT.getInt(), Settings.CATEGORIES_BLOCKS_ENABLED.getBoolean()),
DECORATION("decoration", TranslationManager.string(Translations.DECORATION), Settings.DEFAULT_PRICES_DECORATION.getDouble(), 46908, Settings.GUI_MAIN_ITEMS_DECORATION_SLOT.getInt(), Settings.CATEGORIES_DECORATION_ENABLED.getBoolean()),
FOOD_AND_DRINKS("food & drinks", TranslationManager.string(Translations.FOOD_AND_DRINKS), Settings.DEFAULT_PRICES_FOOD_AND_DRINKS.getDouble(), 2686, Settings.GUI_MAIN_ITEMS_FOOD_AND_DRINKS_SLOT.getInt(), Settings.CATEGORIES_FOOD_AND_DRINKS_ENABLED.getBoolean()),
HUMANS("humans", TranslationManager.string(Translations.HUMANS), Settings.DEFAULT_PRICES_HUMANS.getDouble(), 47833, Settings.GUI_MAIN_ITEMS_HUMANS_SLOT.getInt(), Settings.CATEGORIES_HUMANS_ENABLED.getBoolean()),
HUMANOID("humanoid", TranslationManager.string(Translations.HUMANOID), Settings.DEFAULT_PRICES_HUMANOID.getDouble(), 46664, Settings.GUI_MAIN_ITEMS_HUMANOID_SLOT.getInt(), Settings.CATEGORIES_HUMANOID_ENABLED.getBoolean()),
MISCELLANEOUS("miscellaneous", TranslationManager.string(Translations.MISC), Settings.DEFAULT_PRICES_MISC.getDouble(), 45534, Settings.GUI_MAIN_ITEMS_MISC_SLOT.getInt(), Settings.CATEGORIES_MISC_ENABLED.getBoolean()),
MONSTERS("monsters", TranslationManager.string(Translations.MONSTERS), Settings.DEFAULT_PRICES_MONSTERS.getDouble(), 47778, Settings.GUI_MAIN_ITEMS_MONSTERS_SLOT.getInt(), Settings.CATEGORIES_MONSTERS_ENABLED.getBoolean()),
PLANTS("plants", TranslationManager.string(Translations.PLANTS), Settings.DEFAULT_PRICES_PLANTS.getDouble(), 44334, Settings.GUI_MAIN_ITEMS_PLANTS_SLOT.getInt(), Settings.CATEGORIES_PLANTS_ENABLED.getBoolean());


private final String id;
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/ca/tweetzy/skulls/commands/GiveCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
import ca.tweetzy.flight.command.AllowedExecutor;
import ca.tweetzy.flight.command.Command;
import ca.tweetzy.flight.command.ReturnType;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.skulls.model.NumberHelper;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.interfaces.Skull;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.model.NumberHelper;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand All @@ -50,14 +51,15 @@ protected ReturnType execute(CommandSender sender, String... args) {
target = Bukkit.getPlayerExact(args[0]);

if (target == null && !isGiveAll) {
Common.tell(sender, Translation.PLAYER_OFFLINE.getString("player", args[0]));
Common.tell(sender, TranslationManager.string(Translations.PLAYER_OFFLINE, "value", args[0]));
return ReturnType.FAIL;
}

boolean isRandomHead = args[1].equalsIgnoreCase("random");

if (!isRandomHead && !NumberHelper.isInt(args[1])) {
Common.tell(sender, Translation.NOT_A_NUMBER.getString());
Common.tell(sender, TranslationManager.string(Translations.NOT_A_NUMBER, "value", args[1]));

return ReturnType.FAIL;
}

Expand All @@ -66,7 +68,7 @@ protected ReturnType execute(CommandSender sender, String... args) {
Skull skull = isRandomHead ? Skulls.getSkullManager().getRandomSkull() : Skulls.getSkullManager().getSkull(Integer.parseInt(args[1]));

if (skull == null) {
Common.tell(sender, Translation.SKULL_NOT_FOUND.getString());
Common.tell(sender, TranslationManager.string(Translations.SKULL_NOT_FOUND));
return ReturnType.FAIL;
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ca/tweetzy/skulls/commands/InspectCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
import ca.tweetzy.flight.command.ReturnType;
import ca.tweetzy.flight.comp.NBTEditor;
import ca.tweetzy.flight.comp.enums.CompMaterial;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.flight.utils.PlayerUtil;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.interfaces.PlacedSkull;
import ca.tweetzy.skulls.api.interfaces.Skull;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -66,12 +67,11 @@ protected ReturnType execute(CommandSender sender, String... args) {

final Skull skull = Skulls.getSkullManager().getSkull(skullId);
if (skull == null) {
Common.tell(player, Translation.NO_SKULL_INFO.getString());
Common.tell(sender, TranslationManager.string(Translations.NO_SKULL_INFO));
return ReturnType.FAIL;
}


Translation.INSPECT_INFO.getList("skull_id", skullId).forEach(line -> Common.tellNoPrefix(player, line));
Common.tellNoPrefix(sender, TranslationManager.list(Translations.INSPECT_INFO, "skull_id", String.valueOf(skullId)).toArray(new String[0]));
return ReturnType.SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
import ca.tweetzy.flight.command.AllowedExecutor;
import ca.tweetzy.flight.command.Command;
import ca.tweetzy.flight.command.ReturnType;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.flight.utils.QuickItem;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.model.NumberHelper;
import ca.tweetzy.skulls.settings.Settings;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
Expand Down Expand Up @@ -74,7 +75,7 @@ protected ReturnType execute(CommandSender sender, String... args) {
if (args.length == 3) {
final Player targetPlayer = Bukkit.getPlayerExact(args[2]);
if (targetPlayer == null) {
Common.tell(sender, Translation.PLAYER_OFFLINE.getString("player", args[2]));
Common.tell(sender, TranslationManager.string(Translations.PLAYER_OFFLINE, "value", args[2]));
return;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/ca/tweetzy/skulls/commands/SearchCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ protected ReturnType execute(CommandSender commandSender, String... args) {
if (createError == null) {
Skulls.getPlayerManager().addPlayer(created);
Skulls.getGuiManager().showGUI(player, new SkullsViewGUI(null, created, builder.toString().trim(), ViewMode.SEARCH));
} else {
Skulls.getGuiManager().showGUI(player, new SkullsViewGUI(null, new SkullPlayer(player.getUniqueId(), new ArrayList<>()), builder.toString().trim(), ViewMode.SEARCH));

}
});
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/ca/tweetzy/skulls/commands/SkullsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
import ca.tweetzy.flight.command.AllowedExecutor;
import ca.tweetzy.flight.command.Command;
import ca.tweetzy.flight.command.ReturnType;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.guis.MainGUI;
import ca.tweetzy.skulls.settings.Settings;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

Expand All @@ -46,6 +49,11 @@ protected ReturnType execute(CommandSender commandSender, String... strings) {
if (commandSender instanceof Player) {
final Player player = (Player) commandSender;

if (Skulls.getSkullManager().isLoading()) {
Common.tell(player, TranslationManager.string(Translations.LOADING));
return ReturnType.FAIL;
}

if (player.hasPermission("skulls.command.main") || Settings.MAIN_MENU_REQUIRES_NO_PERM.getBoolean())
Skulls.getGuiManager().showGUI(player, new MainGUI(player));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ca/tweetzy/skulls/database/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void insertSkulls(Collection<Skull> skulls) {
}

statement.executeBatch();
Skulls.getInstance().getSkullManager().setDownloading(false);
Skulls.getSkullManager().setDownloading(false);
Common.broadcast("&r&aFinished inserting all heads into the data file!");
}));
}
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/ca/tweetzy/skulls/guis/CategorySelectorGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
import ca.tweetzy.flight.comp.enums.CompMaterial;
import ca.tweetzy.flight.gui.events.GuiClickEvent;
import ca.tweetzy.flight.gui.template.PagedGUI;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.QuickItem;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.interfaces.Category;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.inventory.ItemStack;

import java.util.function.Consumer;
Expand All @@ -40,16 +41,16 @@ public final class CategorySelectorGUI extends PagedGUI<Category> {
private final Consumer<Category> selected;

public CategorySelectorGUI(Consumer<Category> selected) {
super(null, Translation.GUI_CUSTOM_CATEGORY_SELECTOR_TITLE.getString(), 6, Skulls.getCategoryManager().getCustomCategories());
super(null, TranslationManager.string(Translations.GUI_CUSTOM_CATEGORY_SELECTOR_TITLE), 6, Skulls.getCategoryManager().getCustomCategories());
this.selected = selected;
draw();
}

@Override
protected ItemStack makeDisplayItem(Category category) {
return QuickItem.of(CompMaterial.WRITTEN_BOOK)
.lore(Translation.GUI_CUSTOM_CATEGORY_SELECTOR_ITEMS_CATEGORY_LORE.getList("category_size", category.getSkulls().size()))
.name(Translation.GUI_CUSTOM_CATEGORY_SELECTOR_ITEMS_CATEGORY_NAME.getString("category_name", category.getName()))
.lore(TranslationManager.list(Translations.GUI_CUSTOM_CATEGORY_SELECTOR_ITEMS_CATEGORY_LORE, "category_size", category.getSkulls().size()))
.name(TranslationManager.string(Translations.GUI_CUSTOM_CATEGORY_SELECTOR_ITEMS_CATEGORY_NAME, "category_name", category.getName()))
.hideTags(true)
.make();
}
Expand Down
19 changes: 10 additions & 9 deletions src/main/java/ca/tweetzy/skulls/guis/CustomCategoryListGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
import ca.tweetzy.flight.gui.Gui;
import ca.tweetzy.flight.gui.events.GuiClickEvent;
import ca.tweetzy.flight.gui.template.PagedGUI;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.flight.utils.QuickItem;
import ca.tweetzy.flight.utils.input.TitleInput;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.enums.ViewMode;
import ca.tweetzy.skulls.api.interfaces.Category;
import ca.tweetzy.skulls.impl.SkullCategory;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
Expand All @@ -47,16 +48,16 @@ public final class CustomCategoryListGUI extends PagedGUI<Category> {
private final Player viewer;

public CustomCategoryListGUI(Player viewer, Gui parent) {
super(parent, Translation.GUI_CUSTOM_CATEGORY_LIST_TITLE.getString(), 6, Skulls.getCategoryManager().getCustomCategories());
super(parent, TranslationManager.string(Translations.GUI_CUSTOM_CATEGORY_LIST_TITLE), 6, Skulls.getCategoryManager().getCustomCategories());
this.viewer = viewer;
draw();
}

@Override
protected ItemStack makeDisplayItem(Category category) {
return QuickItem.of(CompMaterial.WRITTEN_BOOK)
.name(Translation.GUI_CUSTOM_CATEGORY_LIST_ITEMS_CATEGORY_NAME.getString("category_name", category.getName()))
.lore(Translation.GUI_CUSTOM_CATEGORY_LIST_ITEMS_CATEGORY_LORE.getList("category_size", category.getSkulls().size()))
.name(TranslationManager.string(Translations.GUI_CUSTOM_CATEGORY_LIST_ITEMS_CATEGORY_NAME, "category_name", category.getName()))
.lore(TranslationManager.list(Translations.GUI_CUSTOM_CATEGORY_LIST_ITEMS_CATEGORY_LORE, "category_size", category.getSkulls().size()))
.hideTags(true)
.make();
}
Expand All @@ -65,9 +66,9 @@ protected ItemStack makeDisplayItem(Category category) {
protected void drawAdditional() {
if (this.viewer.hasPermission("skulls.admin"))
setButton(5, 4, QuickItem.of(CompMaterial.SLIME_BALL)
.name(Translation.GUI_CUSTOM_CATEGORY_LIST_ITEMS_NEW_NAME.getString())
.lore(Translation.GUI_CUSTOM_CATEGORY_LIST_ITEMS_NEW_LORE.getList())
.make(), click -> new TitleInput(Skulls.getInstance(),click.player, Translation.INPUT_CATEGORY_CREATE_TITLE.getString(), Translation.INPUT_CATEGORY_CREATE_SUBTITLE.getString()) {
.name(TranslationManager.string(Translations.GUI_CUSTOM_CATEGORY_LIST_ITEMS_NEW_NAME))
.lore(TranslationManager.list(Translations.GUI_CUSTOM_CATEGORY_LIST_ITEMS_NEW_LORE))
.make(), click -> new TitleInput(Skulls.getInstance(), click.player, TranslationManager.string(Translations.INPUT_CATEGORY_CREATE_TITLE), TranslationManager.string(Translations.INPUT_CATEGORY_CREATE_SUBTITLE)) {

@Override
public void onExit(Player player) {
Expand All @@ -79,7 +80,7 @@ public boolean onResult(String string) {
string = ChatColor.stripColor(string.trim());

if (Skulls.getCategoryManager().findCategory(string) != null) {
Common.tell(click.player, Translation.ID_TAKEN.getString());
Common.tell(click.player, TranslationManager.string(Translations.ID_TAKEN));
return false;
}

Expand All @@ -100,7 +101,7 @@ public boolean onResult(String string) {
@Override
protected void onClick(Category category, GuiClickEvent clickEvent) {
if (!clickEvent.player.hasPermission("skulls.customcategory." + category.getId().toLowerCase())) {
Common.tell(clickEvent.player, Translation.NO_PERMISSIONS.getKey());
Common.tell(clickEvent.player, TranslationManager.string(Translations.CATEGORY_PERMISSION));
return;
}

Expand Down
13 changes: 7 additions & 6 deletions src/main/java/ca/tweetzy/skulls/guis/HistoryViewGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import ca.tweetzy.flight.gui.Gui;
import ca.tweetzy.flight.gui.events.GuiClickEvent;
import ca.tweetzy.flight.gui.template.PagedGUI;
import ca.tweetzy.flight.settings.TranslationManager;
import ca.tweetzy.flight.utils.Common;
import ca.tweetzy.flight.utils.QuickItem;
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.enums.BaseCategory;
import ca.tweetzy.skulls.api.interfaces.History;
import ca.tweetzy.skulls.settings.Translation;
import ca.tweetzy.skulls.settings.Translations;
import org.bukkit.Bukkit;
import org.bukkit.inventory.ItemStack;

Expand All @@ -44,7 +45,7 @@
public final class HistoryViewGUI extends PagedGUI<History> {

public HistoryViewGUI(Gui parent) {
super(parent, Translation.GUI_HISTORIES_TITLE.getString(), 6, Skulls.getSkullManager().getHistories());
super(parent, TranslationManager.string(Translations.GUI_HISTORIES_TITLE), 6, Skulls.getSkullManager().getHistories());
draw();
}

Expand All @@ -57,18 +58,18 @@ protected ItemStack makeDisplayItem(History history) {

return QuickItem
.of(downloaded ? CompMaterial.LIME_STAINED_GLASS_PANE : CompMaterial.RED_STAINED_GLASS_PANE)
.name(Translation.GUI_HISTORIES_ITEMS_HISTORY_NAME.getString("history_id", history.getID()))
.lore(Translation.GUI_HISTORIES_ITEMS_HISTORY_LORE.getList(
.name(TranslationManager.string(Translations.GUI_HISTORIES_ITEMS_HISTORY_NAME, "history_id", history.getID()))
.lore(TranslationManager.list(Translations.GUI_HISTORIES_ITEMS_HISTORY_LORE,
"history_size", history.getSkulls().size(),
"is_true", downloaded ? Translation.MISC_IS_TRUE.getString() : Translation.MISC_IS_FALSE.getString(),
"is_true", TranslationManager.string(downloaded ? Translations.MISC_IS_TRUE : Translations.MISC_IS_FALSE),
"history_time", sdf.format(resultDate)
))
.make();
}

@Override
protected void drawAdditional() {
setButton(5,8, QuickItem.of(CompMaterial.GOLD_NUGGET).name("&e&lForce Sync Prices").lore("&7Clicking this will force update all the prices", "&7for all skulls to the default category price", "&7set within the configuration file.").make(), click -> {
setButton(5, 8, QuickItem.of(CompMaterial.GOLD_NUGGET).name("&e&lForce Sync Prices").lore("&7Clicking this will force update all the prices", "&7for all skulls to the default category price", "&7set within the configuration file.").make(), click -> {
// Skulls.getDataManager().syncSkullPricesByCategory(null);

AtomicInteger total = new AtomicInteger(0);
Expand Down
Loading

0 comments on commit 30dc913

Please sign in to comment.