2019-10-30 07:44:26 +01:00
|
|
|
package world.bentobox.challenges;
|
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
import static org.junit.Assert.assertFalse;
|
|
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
import static org.junit.Assert.assertNull;
|
|
|
|
import static org.junit.Assert.assertTrue;
|
|
|
|
import static org.mockito.ArgumentMatchers.any;
|
|
|
|
import static org.mockito.ArgumentMatchers.anyString;
|
|
|
|
import static org.mockito.Mockito.mock;
|
|
|
|
import static org.mockito.Mockito.never;
|
|
|
|
import static org.mockito.Mockito.times;
|
|
|
|
import static org.mockito.Mockito.verify;
|
|
|
|
import static org.mockito.Mockito.when;
|
|
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
|
|
import java.io.BufferedWriter;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.FileReader;
|
|
|
|
import java.io.FileWriter;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Optional;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
import org.bukkit.Server;
|
|
|
|
import org.bukkit.UnsafeValues;
|
|
|
|
import org.bukkit.World;
|
|
|
|
import org.bukkit.inventory.ItemFactory;
|
|
|
|
import org.bukkit.inventory.meta.ItemMeta;
|
|
|
|
import org.bukkit.plugin.PluginManager;
|
|
|
|
import org.eclipse.jdt.annotation.NonNull;
|
|
|
|
import org.eclipse.jdt.annotation.Nullable;
|
|
|
|
import org.junit.After;
|
|
|
|
import org.junit.Before;
|
2020-07-12 13:43:15 +02:00
|
|
|
import org.junit.Ignore;
|
2019-10-30 07:44:26 +01:00
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
import org.mockito.Mock;
|
|
|
|
import org.powermock.api.mockito.PowerMockito;
|
|
|
|
import org.powermock.core.classloader.annotations.PrepareForTest;
|
|
|
|
import org.powermock.modules.junit4.PowerMockRunner;
|
|
|
|
import org.powermock.reflect.Whitebox;
|
|
|
|
|
|
|
|
import world.bentobox.bentobox.BentoBox;
|
|
|
|
import world.bentobox.bentobox.api.addons.AddonDescription;
|
|
|
|
import world.bentobox.bentobox.api.addons.GameModeAddon;
|
|
|
|
import world.bentobox.bentobox.api.user.User;
|
|
|
|
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType;
|
|
|
|
import world.bentobox.bentobox.managers.IslandWorldManager;
|
|
|
|
import world.bentobox.bentobox.managers.PlaceholdersManager;
|
|
|
|
import world.bentobox.bentobox.util.Util;
|
|
|
|
import world.bentobox.challenges.config.Settings;
|
|
|
|
import world.bentobox.challenges.database.object.Challenge;
|
|
|
|
import world.bentobox.challenges.database.object.Challenge.ChallengeType;
|
|
|
|
import world.bentobox.challenges.database.object.ChallengeLevel;
|
2020-11-05 08:24:06 +01:00
|
|
|
import world.bentobox.challenges.database.object.requirements.IslandRequirements;
|
2019-10-30 07:44:26 +01:00
|
|
|
import world.bentobox.challenges.events.ChallengeCompletedEvent;
|
|
|
|
import world.bentobox.challenges.events.ChallengeResetAllEvent;
|
|
|
|
import world.bentobox.challenges.events.ChallengeResetEvent;
|
|
|
|
import world.bentobox.challenges.events.LevelCompletedEvent;
|
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
|
|
|
import world.bentobox.challenges.managers.ChallengesManager;
|
2019-10-30 07:44:26 +01:00
|
|
|
import world.bentobox.challenges.utils.LevelStatus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author tastybento
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
@RunWith(PowerMockRunner.class)
|
|
|
|
@PrepareForTest({Bukkit.class, BentoBox.class, Util.class})
|
|
|
|
public class ChallengesManagerTest {
|
|
|
|
|
|
|
|
// Constants
|
|
|
|
private static final String GAME_MODE_NAME = "BSkyBlock";
|
|
|
|
|
|
|
|
// Mocks
|
|
|
|
@Mock
|
|
|
|
private ChallengesAddon addon;
|
|
|
|
@Mock
|
|
|
|
private Settings settings;
|
|
|
|
@Mock
|
|
|
|
private IslandWorldManager iwm;
|
|
|
|
@Mock
|
|
|
|
private Server server;
|
|
|
|
@Mock
|
|
|
|
private PluginManager pim;
|
|
|
|
@Mock
|
|
|
|
private ItemFactory itemFactory;
|
|
|
|
@Mock
|
|
|
|
private User user;
|
|
|
|
@Mock
|
|
|
|
private World world;
|
|
|
|
@Mock
|
|
|
|
private GameModeAddon gameModeAddon;
|
|
|
|
@Mock
|
|
|
|
private PlaceholdersManager plhm;
|
|
|
|
|
|
|
|
// Variable fields
|
|
|
|
private ChallengesManager cm;
|
|
|
|
private File database;
|
|
|
|
private Challenge challenge;
|
|
|
|
private @NonNull ChallengeLevel level;
|
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
|
|
|
private final UUID playerID = UUID.randomUUID();
|
2019-10-30 07:44:26 +01:00
|
|
|
private String cName;
|
|
|
|
private String levelName;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @throws java.lang.Exception
|
|
|
|
*/
|
|
|
|
@Before
|
|
|
|
public void setUp() throws Exception {
|
|
|
|
// Set up plugin
|
|
|
|
BentoBox plugin = mock(BentoBox.class);
|
|
|
|
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
|
|
|
when(addon.getPlugin()).thenReturn(plugin);
|
2020-05-09 21:51:13 +02:00
|
|
|
User.setPlugin(plugin);
|
2019-10-30 07:44:26 +01:00
|
|
|
|
|
|
|
// IWM
|
|
|
|
when(plugin.getIWM()).thenReturn(iwm);
|
|
|
|
when(iwm.inWorld(any(World.class))).thenReturn(true);
|
|
|
|
|
|
|
|
// Placeholders
|
|
|
|
when(plugin.getPlaceholdersManager()).thenReturn(plhm);
|
|
|
|
|
|
|
|
// Settings for Database
|
|
|
|
world.bentobox.bentobox.Settings s = mock(world.bentobox.bentobox.Settings.class);
|
|
|
|
when(plugin.getSettings()).thenReturn(s);
|
|
|
|
when(s.getDatabaseType()).thenReturn(DatabaseType.JSON);
|
|
|
|
|
|
|
|
// Addon Settings
|
|
|
|
when(addon.getChallengesSettings()).thenReturn(settings);
|
|
|
|
when(settings.isStoreHistory()).thenReturn(true);
|
|
|
|
when(settings.getLifeSpan()).thenReturn(10);
|
|
|
|
|
|
|
|
// Database
|
|
|
|
database = new File("database");
|
|
|
|
tearDown();
|
|
|
|
|
|
|
|
// Bukkit
|
|
|
|
PowerMockito.mockStatic(Bukkit.class);
|
|
|
|
when(Bukkit.getServer()).thenReturn(server);
|
|
|
|
when(Bukkit.getPluginManager()).thenReturn(pim);
|
|
|
|
when(Bukkit.getWorld(anyString())).thenReturn(world);
|
|
|
|
|
|
|
|
ItemMeta meta = mock(ItemMeta.class);
|
|
|
|
when(itemFactory.getItemMeta(any())).thenReturn(meta);
|
|
|
|
when(Bukkit.getItemFactory()).thenReturn(itemFactory);
|
|
|
|
UnsafeValues unsafe = mock(UnsafeValues.class);
|
|
|
|
when(unsafe.getDataVersion()).thenReturn(777);
|
|
|
|
when(Bukkit.getUnsafe()).thenReturn(unsafe);
|
|
|
|
|
|
|
|
// Challenge
|
|
|
|
challenge = new Challenge();
|
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
|
|
|
String uuid = UUID.randomUUID().toString();
|
2019-10-30 07:44:26 +01:00
|
|
|
challenge.setUniqueId(GAME_MODE_NAME + "_" + uuid);
|
|
|
|
challenge.setFriendlyName("name");
|
|
|
|
challenge.setLevel(GAME_MODE_NAME + "_novice");
|
|
|
|
challenge.setDescription(Collections.singletonList("A description"));
|
2020-11-05 08:24:06 +01:00
|
|
|
challenge.setRequirements(new IslandRequirements());
|
2019-10-30 07:44:26 +01:00
|
|
|
|
|
|
|
// Challenge Level
|
|
|
|
level = new ChallengeLevel();
|
|
|
|
levelName = GAME_MODE_NAME + "_novice";
|
|
|
|
level.setUniqueId(levelName);
|
|
|
|
level.setFriendlyName("Novice");
|
|
|
|
|
|
|
|
// User
|
|
|
|
when(user.getUniqueId()).thenReturn(playerID);
|
|
|
|
|
|
|
|
// Util
|
|
|
|
PowerMockito.mockStatic(Util.class);
|
|
|
|
when(Util.getWorld(any())).thenReturn(world);
|
|
|
|
|
|
|
|
// Addon
|
|
|
|
AddonDescription desc = new AddonDescription.Builder("main", GAME_MODE_NAME, "1.0").build();
|
|
|
|
when(gameModeAddon.getDescription()).thenReturn(desc);
|
|
|
|
Optional<GameModeAddon> opAddon = Optional.of(gameModeAddon);
|
|
|
|
when(iwm.getAddon(any())).thenReturn(opAddon);
|
|
|
|
|
|
|
|
// Challenge name
|
|
|
|
cName = GAME_MODE_NAME + "_" + uuid;
|
|
|
|
|
|
|
|
// Class under test
|
|
|
|
cm = new ChallengesManager(addon);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @throws java.lang.Exception
|
|
|
|
*/
|
|
|
|
@After
|
|
|
|
public void tearDown() throws Exception {
|
2021-03-07 20:00:39 +01:00
|
|
|
new File("addon.jar").delete();
|
|
|
|
new File("config.yml").delete();
|
|
|
|
deleteAll(new File("addons"));
|
|
|
|
deleteAll(new File("database"));
|
|
|
|
deleteAll(new File("database_backup"));
|
|
|
|
}
|
|
|
|
|
|
|
|
private void deleteAll(File file) throws IOException {
|
|
|
|
if (file.exists()) {
|
|
|
|
Files.walk(file.toPath())
|
2019-10-30 07:44:26 +01:00
|
|
|
.sorted(Comparator.reverseOrder())
|
|
|
|
.map(Path::toFile)
|
|
|
|
.forEach(File::delete);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#load()}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoad() throws InterruptedException {
|
|
|
|
verify(addon).log("Loading challenges...");
|
|
|
|
verify(addon, never()).logError(anyString());
|
|
|
|
this.testSaveLevel();
|
|
|
|
this.testSaveChallenge();
|
|
|
|
cm.load();
|
|
|
|
verify(addon, times(2)).log("Loading challenges...");
|
|
|
|
verify(addon, never()).logError(anyString());
|
|
|
|
assertTrue(cm.containsChallenge(cName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#reload()}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testReload() throws InterruptedException {
|
|
|
|
cm.reload();
|
|
|
|
verify(addon).log("Reloading challenges...");
|
|
|
|
this.testSaveLevel();
|
|
|
|
this.testSaveChallenge();
|
|
|
|
cm.reload();
|
|
|
|
verify(addon, times(2)).log("Reloading challenges...");
|
|
|
|
verify(addon, never()).logError(anyString());
|
|
|
|
assertTrue(cm.containsChallenge(cName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadChallenge(world.bentobox.challenges.database.object.Challenge, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadChallengeNoOverwriteSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// load twice - no overwrite
|
2023-04-15 21:55:34 +02:00
|
|
|
assertFalse(cm.loadChallenge(challenge, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadChallenge(world.bentobox.challenges.database.object.Challenge, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadChallengeNoOverwriteNotSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// load twice - no overwrite, not silent
|
2023-04-15 21:55:34 +02:00
|
|
|
assertFalse(cm.loadChallenge(challenge, world, false, user, false));
|
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
|
|
|
verify(user).getTranslation("challenges.messages.load-skipping", "[value]", "name");
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadChallenge(world.bentobox.challenges.database.object.Challenge, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadChallengeOverwriteSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// overwrite
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, true, user, true));
|
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
|
|
|
verify(user, never()).getTranslation(anyString(), anyString(), anyString());
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadChallenge(world.bentobox.challenges.database.object.Challenge, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadChallengeOverwriteNotSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// overwrite not silent
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadChallenge(challenge, world, true, user, false));
|
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
|
|
|
verify(user).getTranslation("challenges.messages.load-overwriting", "[value]", "name");
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadLevel(world.bentobox.challenges.database.object.ChallengeLevel, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadLevelNoOverwriteSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// load twice - no overwrite
|
2023-04-15 21:55:34 +02:00
|
|
|
assertFalse(cm.loadLevel(level, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadLevel(world.bentobox.challenges.database.object.ChallengeLevel, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadLevelNoOverwriteNotSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// load twice - no overwrite, not silent
|
2023-04-15 21:55:34 +02:00
|
|
|
assertFalse(cm.loadLevel(level, world, false, user, false));
|
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
|
|
|
verify(user).getTranslation("challenges.messages.load-skipping", "[value]", "Novice");
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadLevel(world.bentobox.challenges.database.object.ChallengeLevel, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadLevelOverwriteSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// overwrite
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, true, user, true));
|
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
|
|
|
verify(user, never()).getTranslation(anyString(), anyString(), anyString());
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-04-15 21:55:34 +02:00
|
|
|
* Test method for {@link ChallengesManager#loadLevel(world.bentobox.challenges.database.object.ChallengeLevel, World, boolean, world.bentobox.bentobox.api.user.User, boolean)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testLoadLevelOverwriteNotSilent() {
|
|
|
|
// load once
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, false, user, true));
|
2019-10-30 07:44:26 +01:00
|
|
|
// overwrite not silent
|
2023-04-15 21:55:34 +02:00
|
|
|
assertTrue(cm.loadLevel(level, world, true, user, false));
|
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
|
|
|
verify(user).getTranslation("challenges.messages.load-overwriting", "[value]", "Novice");
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#removeFromCache(java.util.UUID)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
2020-07-12 13:43:15 +02:00
|
|
|
@Ignore("This method does not do anything so there is no need to test right now.")
|
2019-10-30 07:44:26 +01:00
|
|
|
@Test
|
|
|
|
public void testRemoveFromCache() {
|
|
|
|
cm.removeFromCache(playerID);
|
|
|
|
verify(settings).isStoreAsIslandData();
|
|
|
|
// TODO there should be a test where isStoreAsIslandData returns true
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#wipeDatabase(boolean, String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testWipeDatabase() throws InterruptedException {
|
|
|
|
// Create some database
|
|
|
|
this.testLoad();
|
|
|
|
|
|
|
|
// Verify file exists
|
|
|
|
File chDir = new File(database, "Challenge");
|
|
|
|
File check = new File(chDir, cName + ".json");
|
|
|
|
assertTrue(check.exists());
|
|
|
|
|
|
|
|
File lvDir = new File(database, "ChallengeLevel");
|
|
|
|
File checkLv = new File(lvDir, levelName + ".json");
|
|
|
|
assertTrue(checkLv.exists());
|
|
|
|
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 20);
|
|
|
|
//cm.save();
|
|
|
|
File plData = new File(database, "ChallengesPlayerData");
|
|
|
|
File checkPd = new File(plData, playerID.toString() + ".json");
|
|
|
|
assertTrue(checkPd.exists());
|
|
|
|
|
|
|
|
// Wipe it
|
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
|
|
|
cm.wipeDatabase(false, "");
|
2019-10-30 07:44:26 +01:00
|
|
|
|
|
|
|
// Verify
|
|
|
|
assertFalse(check.exists());
|
|
|
|
assertFalse(checkLv.exists());
|
|
|
|
assertTrue(checkPd.exists());
|
|
|
|
|
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
|
|
|
cm.wipeDatabase(true, "");
|
|
|
|
// This fails because ChallengesPlayerData still exists
|
|
|
|
//assertFalse(checkPd.exists());
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#wipePlayers(String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testWipePlayers() throws InterruptedException {
|
|
|
|
this.testLoad();
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 20);
|
|
|
|
cm.save();
|
|
|
|
File plData = new File(database, "ChallengesPlayerData");
|
|
|
|
File checkLv = new File(plData, playerID.toString() + ".json");
|
|
|
|
assertTrue(checkLv.exists());
|
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
|
|
|
cm.wipePlayers("");
|
|
|
|
// This fails because ChallengesPlayerData still exists
|
|
|
|
//assertFalse(checkLv.exists());
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#migrateDatabase(world.bentobox.bentobox.api.user.User, org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testMigrateDatabase() {
|
|
|
|
cm.migrateDatabase(user, world);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#save()}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSave() {
|
|
|
|
cm.save();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#saveChallenge(world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSaveChallenge() throws InterruptedException {
|
|
|
|
// Async - may not happen quickly
|
|
|
|
cm.saveChallenge(challenge);
|
|
|
|
Thread.sleep(500);
|
|
|
|
File chDir = new File(database, "Challenge");
|
|
|
|
assertTrue(chDir.exists());
|
|
|
|
File check = new File(chDir, cName + ".json");
|
|
|
|
assertTrue(check.exists());
|
|
|
|
// Remove icon becauseit has mockito meta in it
|
|
|
|
removeLine(check);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
private void removeLine(File inputFile) {
|
2019-10-30 07:44:26 +01:00
|
|
|
File tempFile = new File("myTempFile.json");
|
|
|
|
|
|
|
|
try (BufferedReader reader = new BufferedReader(new FileReader(inputFile))) {
|
|
|
|
try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile))) {
|
|
|
|
|
|
|
|
String lineToRemove = "\"icon";
|
|
|
|
String currentLine;
|
|
|
|
|
|
|
|
while((currentLine = reader.readLine()) != null) {
|
|
|
|
// trim newline when comparing with lineToRemove
|
|
|
|
String trimmedLine = currentLine.trim();
|
|
|
|
if(trimmedLine.startsWith(lineToRemove)) continue;
|
|
|
|
writer.write(currentLine + System.getProperty("line.separator"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
|
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
|
|
|
tempFile.renameTo(inputFile);
|
2019-10-30 07:44:26 +01:00
|
|
|
}
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#saveLevel(world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSaveLevel() throws InterruptedException {
|
|
|
|
cm.saveLevel(level);
|
|
|
|
Thread.sleep(500);
|
|
|
|
File chDir = new File(database, "ChallengeLevel");
|
|
|
|
assertTrue(chDir.exists());
|
|
|
|
File check = new File(chDir, GAME_MODE_NAME + "_novice.json");
|
|
|
|
assertTrue(check.exists());
|
|
|
|
// Remove icon becauseit has mockito meta in it
|
|
|
|
removeLine(check);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#isChallengeComplete(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testIsChallengeCompleteUserWorldChallenge() {
|
|
|
|
assertFalse(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#isChallengeComplete(java.util.UUID, org.bukkit.World, world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testIsChallengeCompleteUUIDWorldChallenge() {
|
|
|
|
assertFalse(cm.isChallengeComplete(playerID, world, challenge));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#isChallengeComplete(java.util.UUID, org.bukkit.World, java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testIsChallengeCompleteUUIDWorldString() {
|
|
|
|
assertFalse(cm.isChallengeComplete(playerID, world, "Novice"));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#setChallengeComplete(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.Challenge, int)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSetChallengeCompleteUserWorldChallengeInt() {
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 3);
|
|
|
|
assertTrue(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeCompletedEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#setChallengeComplete(java.util.UUID, org.bukkit.World, world.bentobox.challenges.database.object.Challenge, int)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSetChallengeCompleteUUIDWorldChallengeInt() {
|
|
|
|
cm.setChallengeComplete(playerID, world, challenge, 3);
|
|
|
|
assertTrue(cm.isChallengeComplete(playerID, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeCompletedEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#setChallengeComplete(java.util.UUID, org.bukkit.World, world.bentobox.challenges.database.object.Challenge, java.util.UUID)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSetChallengeCompleteUUIDWorldChallengeUUID() {
|
|
|
|
UUID adminID = UUID.randomUUID();
|
|
|
|
cm.setChallengeComplete(playerID, world, challenge, adminID);
|
|
|
|
assertTrue(cm.isChallengeComplete(playerID, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeCompletedEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#resetChallenge(java.util.UUID, org.bukkit.World, world.bentobox.challenges.database.object.Challenge, java.util.UUID)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testResetChallenge() {
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 3);
|
|
|
|
assertTrue(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
cm.resetChallenge(playerID, world, challenge, playerID);
|
|
|
|
assertFalse(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeResetEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#resetAllChallenges(world.bentobox.bentobox.api.user.User, org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testResetAllChallengesUserWorld() {
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 3);
|
|
|
|
assertTrue(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
cm.resetAllChallenges(user, world);
|
|
|
|
assertFalse(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeResetAllEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#resetAllChallenges(java.util.UUID, org.bukkit.World, java.util.UUID)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testResetAllChallengesUUIDWorldUUID() {
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 3);
|
|
|
|
assertTrue(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
cm.resetAllChallenges(playerID, world, playerID);
|
|
|
|
assertFalse(cm.isChallengeComplete(user, world, challenge));
|
|
|
|
verify(pim).callEvent(any(ChallengeResetAllEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getChallengeTimes(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetChallengeTimesUserWorldChallenge() {
|
|
|
|
assertEquals(0L, cm.getChallengeTimes(user, world, challenge));
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 6);
|
|
|
|
assertEquals(6L, cm.getChallengeTimes(user, world, challenge));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getChallengeTimes(world.bentobox.bentobox.api.user.User, org.bukkit.World, java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetChallengeTimesUserWorldString() {
|
|
|
|
assertEquals(0L, cm.getChallengeTimes(user, world, cName));
|
|
|
|
cm.setChallengeComplete(user, world, challenge, 6);
|
|
|
|
assertEquals(6L, cm.getChallengeTimes(user, world, cName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#isLevelCompleted(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testIsLevelCompleted() {
|
|
|
|
assertFalse(cm.isLevelCompleted(user, world, level));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#isLevelUnlocked(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testIsLevelUnlocked() {
|
|
|
|
assertFalse(cm.isLevelUnlocked(user, world, level));
|
|
|
|
this.testLoadLevelNoOverwriteSilent();
|
|
|
|
assertTrue(cm.isLevelUnlocked(user, world, level));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#setLevelComplete(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testSetLevelComplete() {
|
|
|
|
assertFalse(cm.isLevelCompleted(user, world, level));
|
|
|
|
cm.setLevelComplete(user, world, level);
|
|
|
|
assertTrue(cm.isLevelCompleted(user, world, level));
|
|
|
|
verify(pim).callEvent(any(LevelCompletedEvent.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#validateLevelCompletion(world.bentobox.bentobox.api.user.User, org.bukkit.World, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testValidateLevelCompletion() {
|
|
|
|
assertTrue(cm.validateLevelCompletion(user, world, level));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getChallengeLevelStatus(java.util.UUID, org.bukkit.World, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetChallengeLevelStatus() {
|
|
|
|
this.testLoadLevelNoOverwriteSilent();
|
|
|
|
LevelStatus cls = cm.getChallengeLevelStatus(playerID, world, level);
|
|
|
|
assertTrue(cls.getNumberOfChallengesStillToDo() == 0);
|
|
|
|
assertEquals(level, cls.getLevel());
|
|
|
|
assertTrue(cls.isComplete());
|
|
|
|
assertTrue(cls.isUnlocked());
|
|
|
|
assertEquals("BSkyBlock_novice", cls.getLevel().getUniqueId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getAllChallengeLevelStatus(world.bentobox.bentobox.api.user.User, org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetAllChallengeLevelStatus() {
|
|
|
|
this.testLoadLevelNoOverwriteSilent();
|
|
|
|
List<LevelStatus> list = cm.getAllChallengeLevelStatus(user, world);
|
|
|
|
assertTrue(list.size() == 1);
|
|
|
|
LevelStatus cls = list.get(0);
|
|
|
|
assertTrue(cls.getNumberOfChallengesStillToDo() == 0);
|
|
|
|
assertEquals(level, cls.getLevel());
|
|
|
|
assertTrue(cls.isComplete());
|
|
|
|
assertTrue(cls.isUnlocked());
|
|
|
|
assertEquals("BSkyBlock_novice", cls.getLevel().getUniqueId());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getAllChallengesNames(org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetAllChallengesNames() {
|
|
|
|
assertTrue(cm.getAllChallengesNames(world).isEmpty());
|
|
|
|
cm.saveChallenge(challenge);
|
2023-04-15 21:55:34 +02:00
|
|
|
cm.loadChallenge(challenge, world, false, user, true);
|
2019-10-30 07:44:26 +01:00
|
|
|
List<String> list = cm.getAllChallengesNames(world);
|
|
|
|
assertFalse(list.isEmpty());
|
|
|
|
assertEquals(cName, list.get(0));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getAllChallenges(org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetAllChallenges() {
|
|
|
|
assertTrue(cm.getAllChallenges(world).isEmpty());
|
|
|
|
cm.saveChallenge(challenge);
|
2023-04-15 21:55:34 +02:00
|
|
|
cm.loadChallenge(challenge, world, false, user, true);
|
2019-10-30 07:44:26 +01:00
|
|
|
List<Challenge> list = cm.getAllChallenges(world);
|
|
|
|
assertFalse(list.isEmpty());
|
|
|
|
assertEquals(challenge, list.get(0));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getFreeChallenges(org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetFreeChallenges() {
|
|
|
|
// Empty
|
|
|
|
assertTrue(cm.getFreeChallenges(world).isEmpty());
|
|
|
|
// One normal
|
|
|
|
cm.saveChallenge(challenge);
|
2023-04-15 21:55:34 +02:00
|
|
|
cm.loadChallenge(challenge, world, false, user, true);
|
2019-10-30 07:44:26 +01:00
|
|
|
assertTrue(cm.getFreeChallenges(world).isEmpty());
|
|
|
|
// One free
|
|
|
|
challenge.setLevel("");
|
|
|
|
cm.saveChallenge(challenge);
|
2023-04-15 21:55:34 +02:00
|
|
|
cm.loadChallenge(challenge, world, false, user, true);
|
2019-10-30 07:44:26 +01:00
|
|
|
List<Challenge> list = cm.getFreeChallenges(world);
|
|
|
|
assertFalse(list.isEmpty());
|
|
|
|
assertEquals(challenge, list.get(0));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getLevelChallenges(world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetLevelChallenges() throws InterruptedException {
|
|
|
|
assertTrue(cm.getLevelChallenges(level).isEmpty());
|
|
|
|
// make some challenges
|
|
|
|
this.testSaveLevel();
|
|
|
|
this.testSaveChallenge();
|
|
|
|
level.setChallenges(Collections.singleton(challenge.getUniqueId()));
|
|
|
|
// Test again
|
|
|
|
List<Challenge> list = cm.getLevelChallenges(level);
|
|
|
|
assertFalse(list.isEmpty());
|
|
|
|
assertEquals(challenge, list.get(0));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getChallenge(java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetChallenge() throws InterruptedException {
|
|
|
|
assertNull(cm.getChallenge(cName));
|
|
|
|
this.testSaveLevel();
|
|
|
|
this.testSaveChallenge();
|
|
|
|
Challenge ch = cm.getChallenge(cName);
|
|
|
|
assertNotNull(ch);
|
|
|
|
assertEquals(cName, ch.getUniqueId());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#containsChallenge(java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testContainsChallenge() {
|
|
|
|
assertFalse(cm.containsChallenge("no-such-challenge"));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#createChallenge(java.lang.String, java.lang.String, world.bentobox.challenges.database.object.Challenge.ChallengeType, world.bentobox.challenges.database.object.requirements.Requirements)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testCreateChallenge() {
|
|
|
|
@Nullable
|
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
|
|
|
Challenge ch = cm.createChallenge("newChal", "newChal", ChallengeType.ISLAND_TYPE, new IslandRequirements());
|
|
|
|
assertEquals(ChallengeType.ISLAND_TYPE, ch.getChallengeType());
|
2019-10-30 07:44:26 +01:00
|
|
|
assertEquals("newChal", ch.getUniqueId());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#deleteChallenge(world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testDeleteChallenge() throws InterruptedException {
|
|
|
|
this.testSaveLevel();
|
|
|
|
this.testSaveChallenge();
|
|
|
|
Challenge ch = cm.getChallenge(cName);
|
|
|
|
assertNotNull(ch);
|
|
|
|
assertEquals(cName, ch.getUniqueId());
|
|
|
|
cm.deleteChallenge(challenge);
|
|
|
|
ch = cm.getChallenge(cName);
|
|
|
|
assertNull(ch);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getLevels(org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetLevels() {
|
|
|
|
this.testGetLevelString();
|
|
|
|
List<ChallengeLevel> lvs = cm.getLevels(world);
|
|
|
|
assertFalse(lvs.isEmpty());
|
|
|
|
assertEquals(level, lvs.get(0));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getLevel(world.bentobox.challenges.database.object.Challenge)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetLevelChallenge() {
|
|
|
|
this.testGetLevelString();
|
|
|
|
assertEquals(level, cm.getLevel(challenge));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#getLevel(java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testGetLevelString() {
|
|
|
|
assertNull(cm.getLevel("dss"));
|
|
|
|
cm.saveLevel(level);
|
2023-04-15 21:55:34 +02:00
|
|
|
cm.loadLevel(level, world, false, user, true);
|
2019-10-30 07:44:26 +01:00
|
|
|
assertEquals(level, cm.getLevel(levelName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#containsLevel(java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testContainsLevel() {
|
|
|
|
this.testGetLevelString();
|
|
|
|
assertFalse(cm.containsLevel("sdsd"));
|
|
|
|
assertTrue(cm.containsLevel(levelName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#addChallengeToLevel(world.bentobox.challenges.database.object.Challenge, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testAddChallengeToLevel() throws InterruptedException {
|
|
|
|
this.testLoad();
|
|
|
|
cm.deleteChallenge(challenge);
|
|
|
|
assertFalse(cm.containsChallenge(cName));
|
|
|
|
cm.addChallengeToLevel(challenge, level);
|
|
|
|
assertEquals(level, cm.getLevel(challenge));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#removeChallengeFromLevel(world.bentobox.challenges.database.object.Challenge, world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testRemoveChallengeFromLevel() throws InterruptedException {
|
|
|
|
this.testAddChallengeToLevel();
|
|
|
|
cm.removeChallengeFromLevel(challenge, level);
|
|
|
|
assertFalse(cm.containsChallenge(cName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#createLevel(java.lang.String, java.lang.String, org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testCreateLevel() {
|
|
|
|
@Nullable
|
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
|
|
|
ChallengeLevel cl = cm.createLevel("Expert", "Expert", world);
|
2019-10-30 07:44:26 +01:00
|
|
|
assertEquals("Expert", cl.getUniqueId());
|
|
|
|
assertEquals(world.getName(), cl.getWorld());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#deleteChallengeLevel(world.bentobox.challenges.database.object.ChallengeLevel)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testDeleteChallengeLevel() throws InterruptedException {
|
|
|
|
this.testAddChallengeToLevel();
|
|
|
|
assertTrue(cm.containsLevel(levelName));
|
|
|
|
cm.deleteChallengeLevel(level);
|
|
|
|
assertFalse(cm.containsLevel(levelName));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#hasAnyChallengeData(org.bukkit.World)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testHasAnyChallengeDataWorld() throws InterruptedException {
|
|
|
|
assertFalse(cm.hasAnyChallengeData(world));
|
|
|
|
this.testLoad();
|
|
|
|
assertTrue(cm.hasAnyChallengeData(world));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
* Test method for {@link ChallengesManager#hasAnyChallengeData(java.lang.String)}.
|
2019-10-30 07:44:26 +01:00
|
|
|
* @throws InterruptedException
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
public void testHasAnyChallengeDataString() throws InterruptedException {
|
|
|
|
assertFalse(cm.hasAnyChallengeData("BSkyBlock"));
|
|
|
|
this.testLoad();
|
|
|
|
assertTrue(cm.hasAnyChallengeData("BSkyBlock"));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|