Commit Graph

201 Commits

Author SHA1 Message Date
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
e9f37e8dee Replace GuiUtils and HeadLib to the PanelUtils library. 2021-10-02 14:04:30 +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
BONNe
644c7d6ba5 Fixes #269
Disable waiver amount message for last challenge level.
2021-09-24 12:55:41 +03:00
BONNe
aa0336d62a 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.
2021-09-24 12:26:44 +03:00
BONNe
09d5bfc8cf Add search button to the CommonPagedPanel.
Search button will allow to search elements if there are more than displayed elements.
2021-09-20 15:14:42 +03:00
BONNe
8c9ddb189d Add missing tooltips to the CommonPagedPanel 2021-09-20 14:41:09 +03:00
BONNe
23fc5310b3 Change download icon from hopper to cobweb. 2021-09-20 14:40:47 +03:00
BONNe
a75c243762 Add search field to the PagedSelectors.
Add missing tooltips.
2021-09-20 14:39:21 +03:00
BONNe
01e6306ef2 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.
2021-09-20 11:15:24 +03:00
BONNe
c1a0eaa2bf Translates color codes for database texts. 2021-09-19 22:56:50 +03:00
BONNe
2bc71b5f52 Clean up Constants a bit. 2021-09-19 21:04:09 +03:00
BONNe
89c51211cd Separate singe and multiple listings. 2021-09-19 18:41:41 +03:00
BONNe
6fbc9d0676 Changes User#sendMessage to Utils#sendMessage
This allows add "prefix" to all messages send from Challenges addon.
2021-09-19 15:36:52 +03:00
BONNe
670513e37a Update all commands.
Commands now will have an option to change their call values.
2021-09-19 15:02:15 +03:00
BONNe
29565538c3 Implements Template reading.
Add template loading via Admin Panel.
Improve LibraryPanel so it could find json and yml files.
2021-09-18 21:37:30 +03:00
BONNe
3ee89af5df Update all admin panels.
Admin panels will not contain better locales codding and easier-to-improve design.

Remove old and unused GUIs.
2021-09-18 12:56:44 +03:00
BONNe
09a30f00db Implement customizable user panels.
Server owners can customize 3 panels:
- main panel
- gamemode selector
- multiple completions

Panel functions will be explained in docs later.
2021-09-18 12:54:17 +03:00
BONNe
3bb0a30657 Rename classes to Selectors.
Split single and multiple item selectors for easier implementation.
Update proper locales.
2021-09-18 12:51:00 +03:00
BONNe
703658eccc Move managers to a separate directory. 2021-08-14 21:43:42 +03:00
BONNe
c63087c5af Create Statistic Requirement for Challenges addon.
Statistic requirement is a new type of challenge that is based on Statistic page for clients.
2021-08-14 19:25:04 +03:00
BONNe
227138a689 Fixes a mistaken permission for completing multiple challenges at once. 2021-04-16 20:38:32 +03:00
BONNe
93f07b95ed Fixes #263
Thanks to @sgdc3 who found my mistake with checking if challenges exists when opening GUI.
2020-11-29 00:25:02 +02:00
BONNe
504c0b410e Add validation methods to challenge and challengeLevel.
Do not load into local cache invalid data. Add error warnings about it.
2020-07-26 12:10:35 +03:00
tastybento
7060799bcc
Rewards lore (#248)
* Ignore failing test because method now doesn't do anything.

* Add spaces after color codes to make gitLocalize more accurate.

* Added a rewards title and made the lore prettier.
2020-07-12 14:43:15 +03:00
BONNe
d3094053eb Fixes #239 2020-07-09 23:25:25 +03:00
BONNe
da5fab8558 Remove settings saving on addon disabling.
Settings are saved on each Settings GUI building.
2020-05-08 10:20:44 +03:00
BONNe
8d5514325c Fix issue when AbandonedListener targeted correct input values.
I did not understand correctly how that listener worked.
2020-04-29 23:15:24 +03:00
BONNe
5a0d63a272 Add option to quit from conversation by writing "cancel" in chat.
Move sanitizeInput to a GuiUtil class.
2020-04-22 01:12:46 +03:00
Florian CUNY
db971d81ab Added a uniqueId sanitization when creating challenges/levels
This will help fixing issues with spaces, hyphens and accents in non-English languages.
2020-02-08 22:28:57 +01:00
tastybento
9d45f08fb1 Test coverage (#199)
* Test coverage for Challenges Command

* Added CompleteChallengeCommand test class

* Added Utils test class

* Added ChallengesGUI test class

* Fix code smells from sonarcloud analysis

* Added .gitignore

* Added Travis CI config file

* WIP ChallengesManager Test class

* Added ChallengesManager test class

* Removed debug

* Removed code smells.

* Added ChallengesAddon test class.

* Added onDisbale test

* Added new TryToComplete test class - WIP

Covers inventory challenges.

* Added Island Challenge entity tests to TryToComplete test class
2019-10-30 08:44:26 +02:00
tastybento
2aa437f071 English update (#193)
* Organized imports

* Minor code cleanup

* Updated English locale file.
2019-10-10 08:35:25 +03:00
BONNe
0c47f811dc Fix issue when users could not select non-block items as icons for challenges and levels. (#190) 2019-09-28 20:09:21 +03:00
BONNe
449890def5 Drop Depricated 1.13 SIGN object.
Update to 1.7 BentoBox.
2019-09-08 20:15:30 +03:00
BONNe
4e6d37cd90 Rework Challenge Object Data storing.
Requires MIGRATION if upgrade from older version.
2019-09-08 20:03:46 +03:00
BONNe
643c5e8f7c Add an option to hide undeployed challenges from challenge list (#175)
Added new config option "gui-settings.undeployed-view-mode" with 3 values
- 'VISIBLE' - all challenges are visible
- 'HIDDEN' - only deployed challenges are visible
- 'TOGGLEABLE' - users will be able to choose option for themself (not implemented)

Implement functionality in ChallengesGUI, where if option hidden is set, then all undeployed challenges are removed.
Implement ability to edit this option via admin Settings panel.
2019-09-05 15:52:14 +03:00
BONNe
e5ec5d5825 Apply new Utils methods in EditChallengesGUI 2019-09-05 13:24:03 +03:00
BONNe
28d61870a7 Fix issue when complete wipe did not work, even when selected. 2019-09-05 13:10:02 +03:00
BONNe
a5022bea7a Improve Wipe Button behaviour.
Add 2 new buttons:
- User wipe - deletes all challenges addon player data.
- challenges wipe - deletes only challenges and levels.

By clicking on challenges wipe with right click, it will switch to compelte wipe, and via versa.
2019-09-05 12:19:05 +03:00
BONNe1704
ecbb8ef1f2 Merge branch 'develop' of https://github.com/BentoBoxWorld/addon-challenges into develop 2019-09-05 12:01:41 +03:00
BONNe
5f1ea920f5 Add download button in Challenges Libraries panel.
Disable access to Library panel if github api is disabled.
2019-09-05 09:36:53 +03:00
BONNe
e854bbd294 Fix issue when Lore GUI buttons were not colored and splitted. 2019-09-03 11:14:26 +03:00
BONNe
c7fe138d78 Add GUI for editing Challenge and Challenge Level lore messages.
Rework Lore message construction.
2019-09-03 09:03:21 +03:00
BONNe1704
f611727d4e Implement WebManager that will download Challenges Libraries from GitHub.
Implement GUI for selecting and downloading Challenges Libraries.
2019-09-02 17:56:24 +03:00
BONNe
29a77147b5 Fix issue when each save added unnecessary "|" at the end of rewards and unlock message. (#123)
Algorithm that I used to join output list into single string, always added "|" at the end. Last "|" should be removed.
2019-09-02 13:20:59 +03:00
BONNe
0026cb7404 Separate all enums from Settings class into SettingsUtils. 2019-09-01 15:17:34 +03:00
BuildTools
235da81ba0 Move Settings class to separate package. 2019-09-01 15:10:05 +03:00
BONNe1704
8e0448eac7 Reintroduce Multiple Completions
Add [gamemode].complete.multiple permission that will allow/prevent to complete challenge multiple times at once.
Introduce new MultipleGUI that opens GUI with 5 buttons that allows to choose how many times challenge should be completed.
2019-08-28 16:55:18 +03:00