Commit Graph

20 Commits

Author SHA1 Message Date
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 deab2d3530 Fix failing Tests.
These tests failed because in I added Server version check in ChallengesAddon class.
2019-05-24 09:39:40 +03:00
BONNe c8088f275d
Rework TryToComplete. (#109)
* Rework TryToComplete.

Implement ability to complete challenge multiple times at once.
To do it, I split everything in checking/removing/rewarding steps.

In checking step, it calculates if it is possible to complete with minimal requirements and then calculates maximal repeating factor.
In removing step, it removes everything that is necessary.
In rewarding step, it give rewards by necessary factor (multilayer).

I rework item/block/entity removing as factors may be influenced at the last element, so I improve everything by memory usage. Create necessary sets/lists/queues for faster access to already collected items.

* Add method that returns removed items, if somehow algorithm did not manage to remove all items.
Fix issue when removeItems method did not merge ItemStacks as they had different item amount.

Return and fix TryToCompleteTest.

* Implement Multiple Challenge Completion command and GUI. (#73)

/[gamemode] challenges complete [number] allows to complete challenges [number] amount (or less if not enough items)
Via GUI users can right click on challenge and if it is repeatable, then it will open AnvilGUI that accepts only numbers as input.
2019-05-06 12:10:02 +03:00
BONNe bf801a67fc Disable TryToCompleteTest as it will fail now.
Need to review and fix this test, as TryToComplete now uses Item.isSimilar() method that is not working outside bukkit environment.
2019-04-24 09:02:11 +03:00
BONNe1704 7bb2ad09d3 Move TryToComplete from panel Package to tasks package. 2019-02-19 19:58:06 +02:00
BONNe1704 f9b941059e Remove Deprecated Classes. 2019-02-18 00:32:51 +02:00
BONNe1704 dba5a44461 Rename Challenges and ChallengeLevels classes. 2019-01-23 16:09:38 +02:00
BONNe1704 59c0f6bfea Deprecate all classes that are not necessary anymore. 2019-01-23 16:08:18 +02:00
Florian CUNY 4c3026f3c1 Version 0.3.0 (BentoBox 1.0) 2019-01-05 11:17:03 +01:00
Florian CUNY 8f51ddb634 Moved everything to world.bentobox.challenges package 2018-12-30 14:31:26 +01:00
tastybento edc2c455c4 Fixes inventory item removal bug (for sure this time).
Also saves player data after player completes a challenge or the
challenge is reset. Now reloading challenges doesn't cause challenge
completion loss.

https://github.com/BentoBoxWorld/addon-challenges/issues/27
https://github.com/BentoBoxWorld/addon-challenges/issues/30
2018-11-23 10:42:20 -08:00
tastybento 326b8ca0cf Fixed item removal. Added unit tests.
https://github.com/BentoBoxWorld/addon-challenges/issues/27
2018-11-19 08:54:31 -08:00
tastybento 482c95d9ce Fixes parsing bug for potions.
https://github.com/BentoBoxWorld/bentobox/issues/265

Adds version from POM to addon.yml
2018-09-03 21:32:26 -07:00
tastybento 2caf744273 Restructured to use Maven resources folder 2018-08-15 20:23:38 -07:00
tastybento c7b4a1ac06 Renamed to bentobox.
Fixed error if level is not enough.
2018-08-03 23:54:36 -07:00
tastybento 457a32a65d Updaed to 1.13 API 2018-07-28 17:15:30 -07:00
Tastybento 18a300c801 Got challenges working to alpha level. 2018-04-14 22:30:04 -07:00
Tastybento 823dcbafd8 Added challenges import from ASkyBlock 2018-04-08 15:37:29 -07:00
Tastybento fd3e7a928f WIP - updated to use latest Panel API 2018-03-11 17:36:06 -07:00