addon-challenges/src/main/java/world/bentobox/challenges/panel/admin/EditSettingsPanel.java

595 lines
22 KiB
Java
Raw Normal View History

Prepare 1.0 Release (#287) * Version 0.8.5 * Retranslated zh-CN.yml (#273) * 50% completed. * 60% completed. * 63% completed. * Completed. * Change the indentation, some improvements. Co-authored-by: zhangYi <apachezy@hotmail.com> * Updated german language file (#278) fixed double & and double whitespace * Fixes a mistaken permission for completing multiple challenges at once. * Fixes translated placeholders in PL translation. Note: translation looks bad. * Update CompleteChallengeCommandTest.java * Upgrade to BentoBox 1.17 API changes. Implement Pladdon functionality. Compile against java 16 and Spigot 1.17 * Fix Java 16 compilation. * Use BentoBox 1.17.0 * Update pom.xml * Create Statistic Requirement for Challenges addon. Statistic requirement is a new type of challenge that is based on Statistic page for clients. * Switch to annotations instead of plugin.yml file. * Move managers to a separate directory. * Add mojang authLib instead of NMS. * Rename classes to Selectors. Split single and multiple item selectors for easier implementation. Update proper locales. * Implement customizable user panels. Server owners can customize 3 panels: - main panel - gamemode selector - multiple completions Panel functions will be explained in docs later. * Update all admin panels. Admin panels will not contain better locales codding and easier-to-improve design. Remove old and unused GUIs. * Remove unused adapters. Updates Challenges and ChallengesLevel objects. Add TypeMigrationAdapter that will fix issue with renamed challenge type. * Update commands. Commands will now call correct GUI. * Update Settings file. Remove unused parts. * Fixes ChallengesManager and Completer. * Adds panel saving to the `/challenges/panels` directory. * Updates locales file. Complete rework of the locales file. Very sorry translators :( no migration. * Updates pom.xml * Updates tests. ChallengesGUITest is removed because GUI is removed. * Update default.json Split text into multiple lines. * Create template YAML file. This file format is for people who has an alergy with ingame GUI. * Implements Template reading. Add template loading via Admin Panel. Improve LibraryPanel so it could find json and yml files. * Improve coloring scheme a bit. * Change settings file. Add ability to change commands for addon. Change default mode from player challenges to island challenges. * Update Main addon class. Move vault and level detection after everything is loaded. Update command names. * Update all commands. Commands now will have an option to change their call values. * Update default config value. * Fixes #264 Challenges Menu will be opened only if player is in correct world. * Changes User#sendMessage to Utils#sendMessage This allows add "prefix" to all messages send from Challenges addon. * Separate singe and multiple listings. * Clean up Constants a bit. * Add meta for items translations. * Fix permission link. * Translates color codes for database texts. * Fixes a bug when global commands does not displays in tab-complete. Remove DefaultsCommand.java as it is not used anymore. * Fixes small bugs in translation. * Remove unnecessary "admin" tag. * Update default locale. * Update latvian locale to the latest version. * Implement multi-linguistic server support. Now server owners can specify different name, description and reward text for each challenge and level via locales file. Add showcase example. * Comment out showcase translation. * Update BentoBox version * Update missing icons for blocks. Some blocks cannot be displayed in GUI's, and were leaving empty spaces. This replaces their icon with a close representative. Fixes #286 * Add missing mob heads. * Fixes illegal stack issues in default challenges. #249 * Change from click-to-select to a proper next/previous page tooltip * Add search field to the PagedSelectors. Add missing tooltips. * Change download icon from hopper to cobweb. * Add missing tooltips to the CommonPagedPanel * Add search button to the CommonPagedPanel. Search button will allow to search elements if there are more than displayed elements. * Add missing strings into locale. * Reorder dependencies The Mojang dependency was blocking out the needed Google common packages. * Prevent errors in TryToCompleteTest Note - tests still fail. * Fixed errors and tests for CompleteChallengeCommandTest * Fixed ChallengesCommandTest tests * Fixes tests * Fix JavaDoc, Shade plugin settings * Updated .gitignore * Try different spigot API version * Remove Vault repo because it is not needed. * Excluded unnecessary files from shading. * Fixes #253 Adds TeamKick and TeamLeave events to the reset check. Do not reset challenges if data is stored per island. As in that case, they will already lose their data. * Fixes #187 Add a new method that updates unlocked level list without changing active level. This method returns if last unlocked level was changed, and in that case it triggers whole gui rebuilding. * Fixes #269 Disable waiver amount message for last challenge level. * Add timeout for repeatable challenges. Relates #71 * Implement timeout respecting in challenges completion. Implement timeout in GUI's. Relates #71 * Implement changing Timeout in the Challenge Edit GUI. Relates #71 * Implement an option to set which item type will ignore metadata per challenge. Fixes #261 Fixes #252 * Fixes failing unit-test * Removed shade plugin from POM * Replace GuiUtils and HeadLib to the PanelUtils library. * Link templates to the docs. * Remove unnecessary NMS dependency. NMS code was used for Player Heads, but instead of NMS now it uses public mojang lib. * Address some code quality reports from SonarCloud. Most of the errors are just sanity checks, as the most of null-pointers were already checked in other ways. * Fixes incorrect NEXT and PREVIOUS button descriptions. Fixes #289 * Implement MetaData ignoring for rewards. While required items had a metadata grouping, reward items did not have it. This will fix that. Fixes #289 * Fix an issue when edit menu did not display item amount. * Update lv translation. * Fixes some small bugs with translation potion base effect. There was an issue that it tried to translate extra effects and ignored main one. Relates to #290 * Fix a bug with completion broadcasting Reported via Discord. * Update pom.xml * Fixes a bug with `-1` repeat-times There was a bug that prevented the challenge to be completed if negative numbers were set in the "max-repeats" value. * Improve equal item listing. Change when items should be grouped. Instead of relaying strictly from ignoreMetaData set, now try to group equal elements without durability check, and use set only if that fails. * Update German translation (#295) * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de> * Fix NPEs when running tests. Note that there are still test failures, but these are assertions and not errors. * Fix error in test class. Note this does not fix the failing assertion. * Fix failing test. Make player default to being on island. * Fixed test failures. * Avoid potential call with a null parameter to User.getInstance * Check for null world * Null check * Added null check * Require non-nulls. getInventory never returns null. * Remove various code smells. Co-authored-by: tastybento <tastybento@wasteofplastic.com> Co-authored-by: apachezy <50116371+apachezy@users.noreply.github.com> Co-authored-by: zhangYi <apachezy@hotmail.com> Co-authored-by: Qumoo <76853697+Qumoo@users.noreply.github.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de>
2022-05-06 18:51:54 +02:00
package world.bentobox.challenges.panel.admin;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.inventory.ItemStack;
import lv.id.bonne.panelutils.PanelUtils;
import world.bentobox.bentobox.api.panels.PanelItem;
import world.bentobox.bentobox.api.panels.PanelListener;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.challenges.ChallengesAddon;
import world.bentobox.challenges.config.Settings;
import world.bentobox.challenges.config.SettingsUtils.GuiMode;
import world.bentobox.challenges.config.SettingsUtils.VisibilityMode;
import world.bentobox.challenges.panel.CommonPanel;
import world.bentobox.challenges.panel.ConversationUtils;
import world.bentobox.challenges.utils.Constants;
import world.bentobox.challenges.utils.Utils;
/**
* This Class creates GUI that allows to change Challenges Addon Settings via in-game
* menu.
*/
public class EditSettingsPanel extends CommonPanel
{
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
*/
private EditSettingsPanel(ChallengesAddon addon,
User user,
World world,
String topLabel,
String permissionPrefix)
{
super(addon, user, world, topLabel, permissionPrefix);
this.settings = this.addon.getChallengesSettings();
}
/**
* @param parentGUI Parent GUI.
*/
private EditSettingsPanel(CommonPanel parentGUI)
{
super(parentGUI);
this.settings = this.addon.getChallengesSettings();
}
/**
* Open the Challenges Admin GUI.
*
* @param addon the addon
* @param world the world
* @param user the user
* @param topLabel the top label
* @param permissionPrefix the permission prefix
*/
public static void open(ChallengesAddon addon,
World world,
User user,
String topLabel,
String permissionPrefix)
{
new EditSettingsPanel(addon, user, world, topLabel, permissionPrefix).build();
}
/**
* Open the Challenges Admin GUI.
*/
public static void open(CommonPanel parentGUI)
{
new EditSettingsPanel(parentGUI).build();
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
@Override
protected void build()
{
PanelBuilder panelBuilder = new PanelBuilder().user(this.user).name(
this.user.getTranslation(Constants.TITLE + "settings"));
PanelUtils.fillBorder(panelBuilder);
panelBuilder.item(10, this.getSettingsButton(Button.SHOW_TITLE));
if (this.settings.isShowCompletionTitle())
{
panelBuilder.item(19, this.getSettingsButton(Button.TITLE_SHOWTIME));
}
panelBuilder.item(28, this.getSettingsButton(Button.BROADCAST));
panelBuilder.item(11, this.getSettingsButton(Button.GLOW_COMPLETED));
panelBuilder.item(20, this.getSettingsButton(Button.REMOVE_COMPLETED));
panelBuilder.item(29, this.getSettingsButton(Button.VISIBILITY_MODE));
Release 1.2.0 (#317) * Init 1.2.0 version * Fixes #311 localization errors in zn-CN. Original translation author translated `[]` placeholders which broke locale * Init 1.2.0 version * Edit some unfit translation (#312) Edit some unfit translation * Fixes a regex bug that replaced every [player] char instead of whole word. * Fixes a crash that prevented STATISTICS entity and material/item challenges to be completed. * Add requirement-not-met-material and requirement-not-met-entity to display statistic required item on error. * Add locale of Chinese-Hong Kong (zh-HK) (#313) Addition of locale updated to latest version * Add ${argLine} to get jacoco coverage * Updated Jacoco POM section * Update build.yml Java 17 for Surefire * Updated pladdon annotations * Add support for gamemode-specific translations. This was a request from Floris * Update ChallengesManagerTest methods with world parameter. * Implement option that excludes undeployed challenges The new option allows to toggle if undeployed challenges should be included in level completion count. Disabling option will not include these challenges for level completion. Fixes #315 * Create plugin.yml (#316) * Create plugin.yml * Update pom.xml * Update ChallengesPladdon.java * Remove dependency to org.apache.commons Replace org.apache.commons.lang.ArrayUtils to a default Java implementation. --------- Co-authored-by: EpicMo <1982742309@qq.com> Co-authored-by: JamesMCL44 <epicquarters@gmail.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-04-15 21:55:34 +02:00
panelBuilder.item(30, this.getSettingsButton(Button.INCLUDE_UNDEPLOYED));
Prepare 1.0 Release (#287) * Version 0.8.5 * Retranslated zh-CN.yml (#273) * 50% completed. * 60% completed. * 63% completed. * Completed. * Change the indentation, some improvements. Co-authored-by: zhangYi <apachezy@hotmail.com> * Updated german language file (#278) fixed double & and double whitespace * Fixes a mistaken permission for completing multiple challenges at once. * Fixes translated placeholders in PL translation. Note: translation looks bad. * Update CompleteChallengeCommandTest.java * Upgrade to BentoBox 1.17 API changes. Implement Pladdon functionality. Compile against java 16 and Spigot 1.17 * Fix Java 16 compilation. * Use BentoBox 1.17.0 * Update pom.xml * Create Statistic Requirement for Challenges addon. Statistic requirement is a new type of challenge that is based on Statistic page for clients. * Switch to annotations instead of plugin.yml file. * Move managers to a separate directory. * Add mojang authLib instead of NMS. * Rename classes to Selectors. Split single and multiple item selectors for easier implementation. Update proper locales. * Implement customizable user panels. Server owners can customize 3 panels: - main panel - gamemode selector - multiple completions Panel functions will be explained in docs later. * Update all admin panels. Admin panels will not contain better locales codding and easier-to-improve design. Remove old and unused GUIs. * Remove unused adapters. Updates Challenges and ChallengesLevel objects. Add TypeMigrationAdapter that will fix issue with renamed challenge type. * Update commands. Commands will now call correct GUI. * Update Settings file. Remove unused parts. * Fixes ChallengesManager and Completer. * Adds panel saving to the `/challenges/panels` directory. * Updates locales file. Complete rework of the locales file. Very sorry translators :( no migration. * Updates pom.xml * Updates tests. ChallengesGUITest is removed because GUI is removed. * Update default.json Split text into multiple lines. * Create template YAML file. This file format is for people who has an alergy with ingame GUI. * Implements Template reading. Add template loading via Admin Panel. Improve LibraryPanel so it could find json and yml files. * Improve coloring scheme a bit. * Change settings file. Add ability to change commands for addon. Change default mode from player challenges to island challenges. * Update Main addon class. Move vault and level detection after everything is loaded. Update command names. * Update all commands. Commands now will have an option to change their call values. * Update default config value. * Fixes #264 Challenges Menu will be opened only if player is in correct world. * Changes User#sendMessage to Utils#sendMessage This allows add "prefix" to all messages send from Challenges addon. * Separate singe and multiple listings. * Clean up Constants a bit. * Add meta for items translations. * Fix permission link. * Translates color codes for database texts. * Fixes a bug when global commands does not displays in tab-complete. Remove DefaultsCommand.java as it is not used anymore. * Fixes small bugs in translation. * Remove unnecessary "admin" tag. * Update default locale. * Update latvian locale to the latest version. * Implement multi-linguistic server support. Now server owners can specify different name, description and reward text for each challenge and level via locales file. Add showcase example. * Comment out showcase translation. * Update BentoBox version * Update missing icons for blocks. Some blocks cannot be displayed in GUI's, and were leaving empty spaces. This replaces their icon with a close representative. Fixes #286 * Add missing mob heads. * Fixes illegal stack issues in default challenges. #249 * Change from click-to-select to a proper next/previous page tooltip * Add search field to the PagedSelectors. Add missing tooltips. * Change download icon from hopper to cobweb. * Add missing tooltips to the CommonPagedPanel * Add search button to the CommonPagedPanel. Search button will allow to search elements if there are more than displayed elements. * Add missing strings into locale. * Reorder dependencies The Mojang dependency was blocking out the needed Google common packages. * Prevent errors in TryToCompleteTest Note - tests still fail. * Fixed errors and tests for CompleteChallengeCommandTest * Fixed ChallengesCommandTest tests * Fixes tests * Fix JavaDoc, Shade plugin settings * Updated .gitignore * Try different spigot API version * Remove Vault repo because it is not needed. * Excluded unnecessary files from shading. * Fixes #253 Adds TeamKick and TeamLeave events to the reset check. Do not reset challenges if data is stored per island. As in that case, they will already lose their data. * Fixes #187 Add a new method that updates unlocked level list without changing active level. This method returns if last unlocked level was changed, and in that case it triggers whole gui rebuilding. * Fixes #269 Disable waiver amount message for last challenge level. * Add timeout for repeatable challenges. Relates #71 * Implement timeout respecting in challenges completion. Implement timeout in GUI's. Relates #71 * Implement changing Timeout in the Challenge Edit GUI. Relates #71 * Implement an option to set which item type will ignore metadata per challenge. Fixes #261 Fixes #252 * Fixes failing unit-test * Removed shade plugin from POM * Replace GuiUtils and HeadLib to the PanelUtils library. * Link templates to the docs. * Remove unnecessary NMS dependency. NMS code was used for Player Heads, but instead of NMS now it uses public mojang lib. * Address some code quality reports from SonarCloud. Most of the errors are just sanity checks, as the most of null-pointers were already checked in other ways. * Fixes incorrect NEXT and PREVIOUS button descriptions. Fixes #289 * Implement MetaData ignoring for rewards. While required items had a metadata grouping, reward items did not have it. This will fix that. Fixes #289 * Fix an issue when edit menu did not display item amount. * Update lv translation. * Fixes some small bugs with translation potion base effect. There was an issue that it tried to translate extra effects and ignored main one. Relates to #290 * Fix a bug with completion broadcasting Reported via Discord. * Update pom.xml * Fixes a bug with `-1` repeat-times There was a bug that prevented the challenge to be completed if negative numbers were set in the "max-repeats" value. * Improve equal item listing. Change when items should be grouped. Instead of relaying strictly from ignoreMetaData set, now try to group equal elements without durability check, and use set only if that fails. * Update German translation (#295) * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de> * Fix NPEs when running tests. Note that there are still test failures, but these are assertions and not errors. * Fix error in test class. Note this does not fix the failing assertion. * Fix failing test. Make player default to being on island. * Fixed test failures. * Avoid potential call with a null parameter to User.getInstance * Check for null world * Null check * Added null check * Require non-nulls. getInventory never returns null. * Remove various code smells. Co-authored-by: tastybento <tastybento@wasteofplastic.com> Co-authored-by: apachezy <50116371+apachezy@users.noreply.github.com> Co-authored-by: zhangYi <apachezy@hotmail.com> Co-authored-by: Qumoo <76853697+Qumoo@users.noreply.github.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de>
2022-05-06 18:51:54 +02:00
panelBuilder.item(21, this.getSettingsButton(Button.LOCKED_LEVEL_ICON));
panelBuilder.item(22, this.getSettingsButton(Button.GAMEMODE_GUI));
if (this.settings.isUseCommonGUI())
{
// This should be active only when single gui is enabled.
panelBuilder.item(31, this.getSettingsButton(Button.ACTIVE_WORLD_LIST));
}
panelBuilder.item(24, this.getSettingsButton(Button.STORE_HISTORY));
if (this.settings.isStoreHistory())
{
panelBuilder.item(33, this.getSettingsButton(Button.PURGE_HISTORY));
}
panelBuilder.item(25, this.getSettingsButton(Button.RESET_ON_NEW));
panelBuilder.item(34, this.getSettingsButton(Button.DATA_PER_ISLAND));
// Return Button
panelBuilder.item(44, this.returnButton);
panelBuilder.listener(new IconChanger());
panelBuilder.build();
}
private PanelItem getSettingsButton(Button button)
{
final String reference = Constants.BUTTON + button.name().toLowerCase() + ".";
final String name = this.user.getTranslation(reference + "name");
final List<String> description = new ArrayList<>(3);
description.add(this.user.getTranslation(reference + "description"));
ItemStack icon;
boolean glow;
PanelItem.ClickHandler clickHandler;
switch (button)
{
case RESET_ON_NEW -> {
description.add(this.user.getTranslation(reference +
(this.settings.isResetChallenges() ? "enabled" : "disabled")));
icon = new ItemStack(Material.LAVA_BUCKET);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setResetChallenges(!this.settings.isResetChallenges());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isResetChallenges();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case BROADCAST -> {
description.add(this.user.getTranslation(reference +
(this.settings.isBroadcastMessages() ? "enabled" : "disabled")));
icon = new ItemStack(Material.JUKEBOX);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setBroadcastMessages(!this.settings.isBroadcastMessages());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isBroadcastMessages();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case REMOVE_COMPLETED -> {
description.add(this.user.getTranslation(reference +
(this.settings.isRemoveCompleteOneTimeChallenges() ? "enabled" : "disabled")));
icon = new ItemStack(Material.MAGMA_BLOCK);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setRemoveCompleteOneTimeChallenges(!this.settings.isRemoveCompleteOneTimeChallenges());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isRemoveCompleteOneTimeChallenges();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case ACTIVE_WORLD_LIST -> {
description.add(this.user.getTranslation(reference +
(this.settings.getUserGuiMode().equals(GuiMode.GAMEMODE_LIST) ?
"disabled" : "enabled")));
icon = new ItemStack(Material.STONE_BUTTON);
clickHandler = (panel, user1, clickType, i) -> {
if (this.settings.getUserGuiMode().equals(GuiMode.GAMEMODE_LIST))
{
this.settings.setUserGuiMode(GuiMode.CURRENT_WORLD);
}
else
{
this.settings.setUserGuiMode(GuiMode.GAMEMODE_LIST);
}
this.addon.saveSettings();
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
return true;
};
glow = this.settings.getUserGuiMode().equals(GuiMode.GAMEMODE_LIST);
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-change"));
}
case GAMEMODE_GUI -> {
description.add(this.user.getTranslation(reference +
(this.settings.isUseCommonGUI() ? "enabled" : "disabled")));
icon = new ItemStack(Material.BLACK_STAINED_GLASS_PANE);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setUseCommonGUI(!this.settings.isUseCommonGUI());
// Need to rebuild more icons
this.build();
this.addon.saveSettings();
return true;
};
glow = this.settings.isUseCommonGUI();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case STORE_HISTORY -> {
description.add(this.user.getTranslation(reference +
(this.settings.isStoreHistory() ? "enabled" : "disabled")));
icon = new ItemStack(Material.WRITTEN_BOOK);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setStoreHistory(!this.settings.isStoreHistory());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isStoreHistory();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case PURGE_HISTORY -> {
description.add(this.user.getTranslation(reference + "value",
Constants.PARAMETER_NUMBER, String.valueOf(this.settings.getLifeSpan())));
icon = new ItemStack(Material.FLINT_AND_STEEL, Math.max(1, this.settings.getLifeSpan()));
clickHandler = (panel, user, clickType, i) -> {
Consumer<Number> numberConsumer = number -> {
if (number != null)
{
this.settings.setLifeSpan(number.intValue());
this.addon.saveSettings();
}
// reopen panel
this.build();
};
ConversationUtils.createNumericInput(numberConsumer,
this.user,
this.user.getTranslation(Constants.CONVERSATIONS + "input-number"),
0,
2000);
return true;
};
glow = false;
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-change"));
}
case DATA_PER_ISLAND -> {
description.add(this.user.getTranslation(reference +
(this.settings.isStoreAsIslandData() ? "enabled" : "disabled")));
icon = new ItemStack(Material.GRASS_BLOCK);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setStoreAsIslandData(!this.settings.isStoreAsIslandData());
// TODO: Migration
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isStoreAsIslandData();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case GLOW_COMPLETED -> {
description.add(this.user.getTranslation(reference +
(this.settings.isAddCompletedGlow() ? "enabled" : "disabled")));
icon = new ItemStack(Material.GLOWSTONE);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setAddCompletedGlow(!this.settings.isAddCompletedGlow());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isAddCompletedGlow();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case LOCKED_LEVEL_ICON -> {
icon = this.settings.getLockedLevelIcon();
clickHandler = (panel, user, clickType, i) ->
{
if (this.selectedButton != null)
{
this.selectedButton = null;
}
else
{
this.selectedButton = button;
}
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
return true;
};
if (this.selectedButton != button)
{
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-change"));
}
else
{
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-on-item"));
}
glow = this.selectedButton == button;
}
case SHOW_TITLE -> {
description.add(this.user.getTranslation(reference +
(this.settings.isShowCompletionTitle() ? "enabled" : "disabled")));
icon = new ItemStack(Material.OAK_SIGN);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setShowCompletionTitle(!this.settings.isShowCompletionTitle());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isShowCompletionTitle();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
case TITLE_SHOWTIME -> {
description.add(this.user.getTranslation(reference + "value",
Constants.PARAMETER_NUMBER, String.valueOf(this.settings.getTitleShowtime())));
icon = new ItemStack(Material.CLOCK, Math.max(1, this.settings.getTitleShowtime()));
clickHandler = (panel, user, clickType, i) -> {
Consumer<Number> numberConsumer = number -> {
if (number != null)
{
this.settings.setTitleShowtime(number.intValue());
this.addon.saveSettings();
}
// reopen panel
this.build();
};
ConversationUtils.createNumericInput(numberConsumer,
this.user,
this.user.getTranslation(Constants.CONVERSATIONS + "input-number"),
0,
2000);
return true;
};
glow = false;
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-change"));
}
case VISIBILITY_MODE -> {
description.add(this.user.getTranslation(reference +
(this.settings.getVisibilityMode().equals(VisibilityMode.VISIBLE) ? "enabled" : "disabled")) +
this.user.getTranslation(reference + "visible"));
description.add(this.user.getTranslation(reference +
(this.settings.getVisibilityMode().equals(VisibilityMode.HIDDEN) ? "enabled" : "disabled")) +
this.user.getTranslation(reference + "hidden"));
if (this.settings.getVisibilityMode().equals(VisibilityMode.VISIBLE))
{
icon = new ItemStack(Material.OAK_PLANKS);
}
else if (this.settings.getVisibilityMode().equals(VisibilityMode.HIDDEN))
{
icon = new ItemStack(Material.OAK_SLAB);
}
else
{
icon = new ItemStack(Material.OAK_BUTTON);
}
clickHandler = (panel, user, clickType, slot) -> {
if (clickType.isRightClick())
{
this.settings.setVisibilityMode(Utils.getPreviousValue(VisibilityMode.values(),
this.settings.getVisibilityMode()));
}
else
{
this.settings.setVisibilityMode(Utils.getNextValue(VisibilityMode.values(),
this.settings.getVisibilityMode()));
}
// Rebuild just this icon
panel.getInventory().setItem(slot, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = false;
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "left-click-to-cycle"));
description.add(this.user.getTranslation(Constants.TIPS + "right-click-to-cycle"));
}
Release 1.2.0 (#317) * Init 1.2.0 version * Fixes #311 localization errors in zn-CN. Original translation author translated `[]` placeholders which broke locale * Init 1.2.0 version * Edit some unfit translation (#312) Edit some unfit translation * Fixes a regex bug that replaced every [player] char instead of whole word. * Fixes a crash that prevented STATISTICS entity and material/item challenges to be completed. * Add requirement-not-met-material and requirement-not-met-entity to display statistic required item on error. * Add locale of Chinese-Hong Kong (zh-HK) (#313) Addition of locale updated to latest version * Add ${argLine} to get jacoco coverage * Updated Jacoco POM section * Update build.yml Java 17 for Surefire * Updated pladdon annotations * Add support for gamemode-specific translations. This was a request from Floris * Update ChallengesManagerTest methods with world parameter. * Implement option that excludes undeployed challenges The new option allows to toggle if undeployed challenges should be included in level completion count. Disabling option will not include these challenges for level completion. Fixes #315 * Create plugin.yml (#316) * Create plugin.yml * Update pom.xml * Update ChallengesPladdon.java * Remove dependency to org.apache.commons Replace org.apache.commons.lang.ArrayUtils to a default Java implementation. --------- Co-authored-by: EpicMo <1982742309@qq.com> Co-authored-by: JamesMCL44 <epicquarters@gmail.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-04-15 21:55:34 +02:00
case INCLUDE_UNDEPLOYED -> {
description.add(this.user.getTranslation(reference +
(this.settings.isIncludeUndeployed() ? "enabled" : "disabled")));
icon = new ItemStack(Material.BARREL);
clickHandler = (panel, user1, clickType, i) -> {
this.settings.setIncludeUndeployed(!this.settings.isIncludeUndeployed());
panel.getInventory().setItem(i, this.getSettingsButton(button).getItem());
this.addon.saveSettings();
return true;
};
glow = this.settings.isIncludeUndeployed();
description.add("");
description.add(this.user.getTranslation(Constants.TIPS + "click-to-toggle"));
}
Prepare 1.0 Release (#287) * Version 0.8.5 * Retranslated zh-CN.yml (#273) * 50% completed. * 60% completed. * 63% completed. * Completed. * Change the indentation, some improvements. Co-authored-by: zhangYi <apachezy@hotmail.com> * Updated german language file (#278) fixed double & and double whitespace * Fixes a mistaken permission for completing multiple challenges at once. * Fixes translated placeholders in PL translation. Note: translation looks bad. * Update CompleteChallengeCommandTest.java * Upgrade to BentoBox 1.17 API changes. Implement Pladdon functionality. Compile against java 16 and Spigot 1.17 * Fix Java 16 compilation. * Use BentoBox 1.17.0 * Update pom.xml * Create Statistic Requirement for Challenges addon. Statistic requirement is a new type of challenge that is based on Statistic page for clients. * Switch to annotations instead of plugin.yml file. * Move managers to a separate directory. * Add mojang authLib instead of NMS. * Rename classes to Selectors. Split single and multiple item selectors for easier implementation. Update proper locales. * Implement customizable user panels. Server owners can customize 3 panels: - main panel - gamemode selector - multiple completions Panel functions will be explained in docs later. * Update all admin panels. Admin panels will not contain better locales codding and easier-to-improve design. Remove old and unused GUIs. * Remove unused adapters. Updates Challenges and ChallengesLevel objects. Add TypeMigrationAdapter that will fix issue with renamed challenge type. * Update commands. Commands will now call correct GUI. * Update Settings file. Remove unused parts. * Fixes ChallengesManager and Completer. * Adds panel saving to the `/challenges/panels` directory. * Updates locales file. Complete rework of the locales file. Very sorry translators :( no migration. * Updates pom.xml * Updates tests. ChallengesGUITest is removed because GUI is removed. * Update default.json Split text into multiple lines. * Create template YAML file. This file format is for people who has an alergy with ingame GUI. * Implements Template reading. Add template loading via Admin Panel. Improve LibraryPanel so it could find json and yml files. * Improve coloring scheme a bit. * Change settings file. Add ability to change commands for addon. Change default mode from player challenges to island challenges. * Update Main addon class. Move vault and level detection after everything is loaded. Update command names. * Update all commands. Commands now will have an option to change their call values. * Update default config value. * Fixes #264 Challenges Menu will be opened only if player is in correct world. * Changes User#sendMessage to Utils#sendMessage This allows add "prefix" to all messages send from Challenges addon. * Separate singe and multiple listings. * Clean up Constants a bit. * Add meta for items translations. * Fix permission link. * Translates color codes for database texts. * Fixes a bug when global commands does not displays in tab-complete. Remove DefaultsCommand.java as it is not used anymore. * Fixes small bugs in translation. * Remove unnecessary "admin" tag. * Update default locale. * Update latvian locale to the latest version. * Implement multi-linguistic server support. Now server owners can specify different name, description and reward text for each challenge and level via locales file. Add showcase example. * Comment out showcase translation. * Update BentoBox version * Update missing icons for blocks. Some blocks cannot be displayed in GUI's, and were leaving empty spaces. This replaces their icon with a close representative. Fixes #286 * Add missing mob heads. * Fixes illegal stack issues in default challenges. #249 * Change from click-to-select to a proper next/previous page tooltip * Add search field to the PagedSelectors. Add missing tooltips. * Change download icon from hopper to cobweb. * Add missing tooltips to the CommonPagedPanel * Add search button to the CommonPagedPanel. Search button will allow to search elements if there are more than displayed elements. * Add missing strings into locale. * Reorder dependencies The Mojang dependency was blocking out the needed Google common packages. * Prevent errors in TryToCompleteTest Note - tests still fail. * Fixed errors and tests for CompleteChallengeCommandTest * Fixed ChallengesCommandTest tests * Fixes tests * Fix JavaDoc, Shade plugin settings * Updated .gitignore * Try different spigot API version * Remove Vault repo because it is not needed. * Excluded unnecessary files from shading. * Fixes #253 Adds TeamKick and TeamLeave events to the reset check. Do not reset challenges if data is stored per island. As in that case, they will already lose their data. * Fixes #187 Add a new method that updates unlocked level list without changing active level. This method returns if last unlocked level was changed, and in that case it triggers whole gui rebuilding. * Fixes #269 Disable waiver amount message for last challenge level. * Add timeout for repeatable challenges. Relates #71 * Implement timeout respecting in challenges completion. Implement timeout in GUI's. Relates #71 * Implement changing Timeout in the Challenge Edit GUI. Relates #71 * Implement an option to set which item type will ignore metadata per challenge. Fixes #261 Fixes #252 * Fixes failing unit-test * Removed shade plugin from POM * Replace GuiUtils and HeadLib to the PanelUtils library. * Link templates to the docs. * Remove unnecessary NMS dependency. NMS code was used for Player Heads, but instead of NMS now it uses public mojang lib. * Address some code quality reports from SonarCloud. Most of the errors are just sanity checks, as the most of null-pointers were already checked in other ways. * Fixes incorrect NEXT and PREVIOUS button descriptions. Fixes #289 * Implement MetaData ignoring for rewards. While required items had a metadata grouping, reward items did not have it. This will fix that. Fixes #289 * Fix an issue when edit menu did not display item amount. * Update lv translation. * Fixes some small bugs with translation potion base effect. There was an issue that it tried to translate extra effects and ignored main one. Relates to #290 * Fix a bug with completion broadcasting Reported via Discord. * Update pom.xml * Fixes a bug with `-1` repeat-times There was a bug that prevented the challenge to be completed if negative numbers were set in the "max-repeats" value. * Improve equal item listing. Change when items should be grouped. Instead of relaying strictly from ignoreMetaData set, now try to group equal elements without durability check, and use set only if that fails. * Update German translation (#295) * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de> * Fix NPEs when running tests. Note that there are still test failures, but these are assertions and not errors. * Fix error in test class. Note this does not fix the failing assertion. * Fix failing test. Make player default to being on island. * Fixed test failures. * Avoid potential call with a null parameter to User.getInstance * Check for null world * Null check * Added null check * Require non-nulls. getInventory never returns null. * Remove various code smells. Co-authored-by: tastybento <tastybento@wasteofplastic.com> Co-authored-by: apachezy <50116371+apachezy@users.noreply.github.com> Co-authored-by: zhangYi <apachezy@hotmail.com> Co-authored-by: Qumoo <76853697+Qumoo@users.noreply.github.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de>
2022-05-06 18:51:54 +02:00
default -> {
icon = new ItemStack(Material.PAPER);
clickHandler = null;
glow = false;
}
}
return new PanelItemBuilder().
icon(icon).
name(name).
description(description).
glow(glow).
clickHandler(clickHandler).
build();
}
// ---------------------------------------------------------------------
// Section: Classes
// ---------------------------------------------------------------------
/**
* This class allows changing icon for Generator Tier
*/
private class IconChanger implements PanelListener
{
/**
* Process inventory click. If generator icon is selected and user clicks on item in his inventory, then change
* icon to the item from inventory.
*
* @param user the user
* @param event the event
*/
@Override
public void onInventoryClick(User user, InventoryClickEvent event)
{
// Handle icon changing
if (EditSettingsPanel.this.selectedButton != null &&
event.getCurrentItem() != null &&
!event.getCurrentItem().getType().equals(Material.AIR) &&
event.getRawSlot() > 44)
{
// set material and amount only. Other data should be removed.
if (EditSettingsPanel.this.selectedButton == Button.LOCKED_LEVEL_ICON)
{
EditSettingsPanel.this.settings.setLockedLevelIcon(event.getCurrentItem().clone());
EditSettingsPanel.this.addon.saveSettings();
// Deselect icon
EditSettingsPanel.this.selectedButton = null;
EditSettingsPanel.this.build();
}
}
}
/**
* On inventory close.
*
* @param event the event
*/
@Override
public void onInventoryClose(InventoryCloseEvent event)
{
// Do nothing
}
/**
* Setup current listener.
*/
@Override
public void setup()
{
// Do nothing
}
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* This enum holds all settings buttons that must have been displayed in this panel.
*/
private enum Button
{
RESET_ON_NEW,
BROADCAST,
REMOVE_COMPLETED,
ACTIVE_WORLD_LIST,
GAMEMODE_GUI,
STORE_HISTORY,
PURGE_HISTORY,
DATA_PER_ISLAND,
GLOW_COMPLETED,
LOCKED_LEVEL_ICON,
SHOW_TITLE,
TITLE_SHOWTIME,
Release 1.2.0 (#317) * Init 1.2.0 version * Fixes #311 localization errors in zn-CN. Original translation author translated `[]` placeholders which broke locale * Init 1.2.0 version * Edit some unfit translation (#312) Edit some unfit translation * Fixes a regex bug that replaced every [player] char instead of whole word. * Fixes a crash that prevented STATISTICS entity and material/item challenges to be completed. * Add requirement-not-met-material and requirement-not-met-entity to display statistic required item on error. * Add locale of Chinese-Hong Kong (zh-HK) (#313) Addition of locale updated to latest version * Add ${argLine} to get jacoco coverage * Updated Jacoco POM section * Update build.yml Java 17 for Surefire * Updated pladdon annotations * Add support for gamemode-specific translations. This was a request from Floris * Update ChallengesManagerTest methods with world parameter. * Implement option that excludes undeployed challenges The new option allows to toggle if undeployed challenges should be included in level completion count. Disabling option will not include these challenges for level completion. Fixes #315 * Create plugin.yml (#316) * Create plugin.yml * Update pom.xml * Update ChallengesPladdon.java * Remove dependency to org.apache.commons Replace org.apache.commons.lang.ArrayUtils to a default Java implementation. --------- Co-authored-by: EpicMo <1982742309@qq.com> Co-authored-by: JamesMCL44 <epicquarters@gmail.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-04-15 21:55:34 +02:00
/**
* This allows to switch between counting/not couting undeployed challenges.
*/
INCLUDE_UNDEPLOYED,
Prepare 1.0 Release (#287) * Version 0.8.5 * Retranslated zh-CN.yml (#273) * 50% completed. * 60% completed. * 63% completed. * Completed. * Change the indentation, some improvements. Co-authored-by: zhangYi <apachezy@hotmail.com> * Updated german language file (#278) fixed double & and double whitespace * Fixes a mistaken permission for completing multiple challenges at once. * Fixes translated placeholders in PL translation. Note: translation looks bad. * Update CompleteChallengeCommandTest.java * Upgrade to BentoBox 1.17 API changes. Implement Pladdon functionality. Compile against java 16 and Spigot 1.17 * Fix Java 16 compilation. * Use BentoBox 1.17.0 * Update pom.xml * Create Statistic Requirement for Challenges addon. Statistic requirement is a new type of challenge that is based on Statistic page for clients. * Switch to annotations instead of plugin.yml file. * Move managers to a separate directory. * Add mojang authLib instead of NMS. * Rename classes to Selectors. Split single and multiple item selectors for easier implementation. Update proper locales. * Implement customizable user panels. Server owners can customize 3 panels: - main panel - gamemode selector - multiple completions Panel functions will be explained in docs later. * Update all admin panels. Admin panels will not contain better locales codding and easier-to-improve design. Remove old and unused GUIs. * Remove unused adapters. Updates Challenges and ChallengesLevel objects. Add TypeMigrationAdapter that will fix issue with renamed challenge type. * Update commands. Commands will now call correct GUI. * Update Settings file. Remove unused parts. * Fixes ChallengesManager and Completer. * Adds panel saving to the `/challenges/panels` directory. * Updates locales file. Complete rework of the locales file. Very sorry translators :( no migration. * Updates pom.xml * Updates tests. ChallengesGUITest is removed because GUI is removed. * Update default.json Split text into multiple lines. * Create template YAML file. This file format is for people who has an alergy with ingame GUI. * Implements Template reading. Add template loading via Admin Panel. Improve LibraryPanel so it could find json and yml files. * Improve coloring scheme a bit. * Change settings file. Add ability to change commands for addon. Change default mode from player challenges to island challenges. * Update Main addon class. Move vault and level detection after everything is loaded. Update command names. * Update all commands. Commands now will have an option to change their call values. * Update default config value. * Fixes #264 Challenges Menu will be opened only if player is in correct world. * Changes User#sendMessage to Utils#sendMessage This allows add "prefix" to all messages send from Challenges addon. * Separate singe and multiple listings. * Clean up Constants a bit. * Add meta for items translations. * Fix permission link. * Translates color codes for database texts. * Fixes a bug when global commands does not displays in tab-complete. Remove DefaultsCommand.java as it is not used anymore. * Fixes small bugs in translation. * Remove unnecessary "admin" tag. * Update default locale. * Update latvian locale to the latest version. * Implement multi-linguistic server support. Now server owners can specify different name, description and reward text for each challenge and level via locales file. Add showcase example. * Comment out showcase translation. * Update BentoBox version * Update missing icons for blocks. Some blocks cannot be displayed in GUI's, and were leaving empty spaces. This replaces their icon with a close representative. Fixes #286 * Add missing mob heads. * Fixes illegal stack issues in default challenges. #249 * Change from click-to-select to a proper next/previous page tooltip * Add search field to the PagedSelectors. Add missing tooltips. * Change download icon from hopper to cobweb. * Add missing tooltips to the CommonPagedPanel * Add search button to the CommonPagedPanel. Search button will allow to search elements if there are more than displayed elements. * Add missing strings into locale. * Reorder dependencies The Mojang dependency was blocking out the needed Google common packages. * Prevent errors in TryToCompleteTest Note - tests still fail. * Fixed errors and tests for CompleteChallengeCommandTest * Fixed ChallengesCommandTest tests * Fixes tests * Fix JavaDoc, Shade plugin settings * Updated .gitignore * Try different spigot API version * Remove Vault repo because it is not needed. * Excluded unnecessary files from shading. * Fixes #253 Adds TeamKick and TeamLeave events to the reset check. Do not reset challenges if data is stored per island. As in that case, they will already lose their data. * Fixes #187 Add a new method that updates unlocked level list without changing active level. This method returns if last unlocked level was changed, and in that case it triggers whole gui rebuilding. * Fixes #269 Disable waiver amount message for last challenge level. * Add timeout for repeatable challenges. Relates #71 * Implement timeout respecting in challenges completion. Implement timeout in GUI's. Relates #71 * Implement changing Timeout in the Challenge Edit GUI. Relates #71 * Implement an option to set which item type will ignore metadata per challenge. Fixes #261 Fixes #252 * Fixes failing unit-test * Removed shade plugin from POM * Replace GuiUtils and HeadLib to the PanelUtils library. * Link templates to the docs. * Remove unnecessary NMS dependency. NMS code was used for Player Heads, but instead of NMS now it uses public mojang lib. * Address some code quality reports from SonarCloud. Most of the errors are just sanity checks, as the most of null-pointers were already checked in other ways. * Fixes incorrect NEXT and PREVIOUS button descriptions. Fixes #289 * Implement MetaData ignoring for rewards. While required items had a metadata grouping, reward items did not have it. This will fix that. Fixes #289 * Fix an issue when edit menu did not display item amount. * Update lv translation. * Fixes some small bugs with translation potion base effect. There was an issue that it tried to translate extra effects and ignored main one. Relates to #290 * Fix a bug with completion broadcasting Reported via Discord. * Update pom.xml * Fixes a bug with `-1` repeat-times There was a bug that prevented the challenge to be completed if negative numbers were set in the "max-repeats" value. * Improve equal item listing. Change when items should be grouped. Instead of relaying strictly from ignoreMetaData set, now try to group equal elements without durability check, and use set only if that fails. * Update German translation (#295) * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize * Translate de.yml via GitLocalize Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de> * Fix NPEs when running tests. Note that there are still test failures, but these are assertions and not errors. * Fix error in test class. Note this does not fix the failing assertion. * Fix failing test. Make player default to being on island. * Fixed test failures. * Avoid potential call with a null parameter to User.getInstance * Check for null world * Null check * Added null check * Require non-nulls. getInventory never returns null. * Remove various code smells. Co-authored-by: tastybento <tastybento@wasteofplastic.com> Co-authored-by: apachezy <50116371+apachezy@users.noreply.github.com> Co-authored-by: zhangYi <apachezy@hotmail.com> Co-authored-by: Qumoo <76853697+Qumoo@users.noreply.github.com> Co-authored-by: tastybento <tastybento@users.noreply.github.com> Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: Patrick <patrick.wassmuth@gmx.de> Co-authored-by: Michael F <unhappyangel83@googlemail.com> Co-authored-by: DAge030 <dage030@web.de>
2022-05-06 18:51:54 +02:00
/**
* This allows to switch between different challenges visibility modes.
*/
VISIBILITY_MODE
}
/**
* This allows faster access to challenges settings object.
*/
private final Settings settings;
/**
* Allows changing locked level icon.
*/
private Button selectedButton;
}