Commit Graph

675 Commits

Author SHA1 Message Date
BONNe
7f58af7588 Merge branch 'develop' into master
# Conflicts:
#	pom.xml
#	src/main/java/world/bentobox/challenges/commands/admin/ChallengesGlobalAdminCommand.java
#	src/main/java/world/bentobox/challenges/managers/ChallengesImportManager.java
#	src/main/java/world/bentobox/challenges/managers/ChallengesManager.java
#	src/main/java/world/bentobox/challenges/panel/CommonPanel.java
#	src/main/java/world/bentobox/challenges/panel/user/ChallengesPanel.java
#	src/main/java/world/bentobox/challenges/tasks/TryToComplete.java
#	src/main/resources/locales/en-US.yml
#	src/main/resources/locales/pl.yml
#	src/main/resources/locales/zh-CN.yml
#	src/main/resources/template.yml
2023-01-05 21:40:14 +02:00
BONNe
4c4ec57562 Update to BentoBox 1.21 and PanelUtils 1.1.0 2023-01-05 21:39:03 +02:00
BONNe
da46a31add Remove unnecessary md files. 2023-01-05 21:34:02 +02:00
BONNe
b7e2bc7719 Merge remote-tracking branch 'origin/develop' into develop 2023-01-05 21:32:30 +02:00
BONNe
c8edfe3b51 Adds potion names to the default locale.
The potion names will not be displayed, but it will add all of them in the locale.
2023-01-05 21:32:03 +02:00
BONNe
cfabb28daf
Add extra parameters for completion commands. (#309)
The 2 new parameters are:
   - [owner] - the owner of island.
   - [name] - the name of the island.

Fixes #304
2022-11-21 08:16:42 +02:00
BONNe
e55503a9cf Add extra parameters for completion commands.
The 2 new parameters are:
   - [owner] - the owner of island.
   - [name] - the name of the island.

Fixes #304
2022-11-21 08:15:38 +02:00
BONNe
57a4c08c0c
Rewrite action display logic. (#308)
There were no filters for action displaying. All actions were active from the start, even if they are not possible.
I added action filter that will remove impossible actions:
    - COMPLETE_MAX and MULTIPLE_PANEL for non-repeatable challenge,
    - already completely finished challenge.
Fixes #307
2022-11-21 08:01:13 +02:00
BONNe
31bd9238d4 Merge remote-tracking branch 'origin/develop' into develop 2022-11-05 04:09:56 +02:00
BONNe
0475c798e1 Fixes missing error translation for not meeting statistics challenge value. 2022-11-05 04:09:43 +02:00
gitlocalize-app[bot]
9b83b5cd06
Update PT (#306)
* Translate pt.yml via GitLocalize

* Translate pt.yml via GitLocalize

Co-authored-by: Mario-Leal <henriquedosgrilo@gmail.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
2022-10-31 08:24:18 +02:00
gitlocalize-app[bot]
d2c8cb2925
Translate pl.yml via GitLocalize (#305)
Co-authored-by: wiktorm12 <wiktorm12@gmail.com>
2022-10-31 08:24:09 +02:00
gitlocalize-app[bot]
e6fdc81937
Translate pl.yml via GitLocalize (#302)
Co-authored-by: wiktorm12 <wiktorm12@gmail.com>
2022-08-27 15:14:59 +03:00
gitlocalize-app[bot]
57d1f9f4cc
Update zh-CN (#300)
* Translate zh-CN.yml via GitLocalize

* Translate zh-CN.yml via GitLocalize

* Translate zh-CN.yml via GitLocalize

Co-authored-by: DuckSoft <realducksoft@gmail.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: Yanhanr <me.yanhan@outlook.com>
2022-08-23 10:54:44 +03:00
gitlocalize-app[bot]
3ca2fbe7eb
Update PL translation (#299)
* Translate pl.yml via GitLocalize

* Translate pl.yml via GitLocalize

* Translate pl.yml via GitLocalize

Co-authored-by: wiktorm12 <wiktorm12@gmail.com>
Co-authored-by: LISU <lisudef@gmail.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
2022-08-23 10:54:28 +03:00
BONNe
c933caebe0 Fixes an issue when error message about file loading was not logged. 2022-07-26 01:02:09 +03:00
BONNe
d59b047555 Fixes missing "required level" string.
I forgot to add correct reference text to the level.

Fixes #298
2022-07-25 11:00:05 +03:00
BONNe
26fb55748f Solves "Comparison method violates its general contract!" crash.
I reworked a comparator for challenges a bit. I did not find the reason why previous was wrong, as it should return the same result as the new one, but for some reason this works, and previous do not.

Fixes #296
2022-07-07 11:27:11 +03:00
BONNe
218e5fc6c4 Fixes an incorrect permission assignment for global admin and global player command.
Reported via discord.
2022-05-13 18:02:42 +03:00
BONNe
629159b52d
Update pom.xml 2022-05-06 23:18:38 +03:00
BONNe
7ac1ab4a61
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 19:51:54 +03:00
tastybento
9cccfa02ba Remove various code smells. 2022-04-16 15:54:49 -07:00
tastybento
6c0915544e Require non-nulls.
getInventory never returns null.
2022-04-16 15:27:35 -07:00
tastybento
37d2039a67 Added null check 2022-04-16 15:21:29 -07:00
tastybento
44ad32df50 Null check 2022-04-16 15:15:26 -07:00
tastybento
e8b4129c3a Check for null world 2022-04-16 15:13:55 -07:00
tastybento
5c2f2ecfc7 Avoid potential call with a null parameter to User.getInstance 2022-04-16 15:12:19 -07:00
tastybento
10d8352f1c Fixed test failures. 2022-04-16 15:03:11 -07:00
tastybento
aff6fcec22 Fix failing test. Make player default to being on island. 2022-04-16 14:49:17 -07:00
tastybento
80f748070e Fix error in test class.
Note this does not fix the failing assertion.
2022-04-16 14:42:52 -07:00
tastybento
2263dae70c Fix NPEs when running tests.
Note that there are still test failures, but these are assertions and
not errors.
2022-04-16 14:36:05 -07:00
gitlocalize-app[bot]
f851a96c9b
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>
2022-04-16 18:34:54 +03:00
BONNe
36ad61b4b9
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.
2022-03-22 12:49:57 +02:00
BONNe
e96e2c7e72
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.
2022-03-22 12:41:27 +02:00
BONNe
48c47f086d
Update pom.xml 2022-03-03 18:33:56 +02:00
BONNe
6bffb2088b
Fix a bug with completion broadcasting
Reported via Discord.
2022-02-20 12:08:58 +02:00
BONNe
b9e57fdebb 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
2022-01-08 13:23:48 +02:00
BONNe
fc1d4fcf06 Update lv translation. 2022-01-04 21:48:36 +02:00
BONNe
23778ffca2 Fix an issue when edit menu did not display item amount. 2022-01-04 21:47:20 +02:00
BONNe
88215b6f0c Implement MetaData ignoring for rewards.
While required items had a metadata grouping, reward items did not have it. This will fix that.

Fixes #289
2022-01-04 21:45:34 +02:00
BONNe
71e0029d46 Fixes incorrect NEXT and PREVIOUS button descriptions.
Fixes #289
2022-01-04 21:38:52 +02:00
BONNe
7fbffbb6d2 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.
2021-12-01 11:30:02 +02:00
BONNe
e7b84768aa Remove unnecessary NMS dependency.
NMS code was used for Player Heads, but instead of NMS now it uses public mojang lib.
2021-12-01 10:16:34 +02:00
BONNe
8f6abf2434 Link templates to the docs. 2021-11-22 13:55:51 +02:00
BONNe
e9f37e8dee Replace GuiUtils and HeadLib to the PanelUtils library. 2021-10-02 14:04:30 +03:00
tastybento
e4f93615ce Removed shade plugin from POM 2021-09-24 19:58:04 -07:00
BONNe
13924a3011 Fixes failing unit-test 2021-09-24 17:19:58 +03:00
BONNe
08d1561138 Implement an option to set which item type will ignore metadata per challenge.
Fixes #261
Fixes #252
2021-09-24 17:16:33 +03:00
BONNe
99a3e3f165 Implement changing Timeout in the Challenge Edit GUI.
Relates #71
2021-09-24 16:16:48 +03:00
BONNe
bb5e861b30 Implement timeout respecting in challenges completion.
Implement timeout in GUI's.

Relates #71
2021-09-24 16:03:02 +03:00