Commit Graph

23 Commits

Author SHA1 Message Date
BONNe
4db59d6c19 Implement completed challenge storage by island (#55).
Rework methods that access to ChallengesPlayerData object. Methods that access to this object will be private and use UUID and String where possible.
Add public methods that could use previously mentioned methods to access ChallengesPlayerData object.
Implement these methods in all places.

Add ability to enable/disable island storage in config (no-gui for now).
Disable challenge GUI opening, if user does not have island.
2019-02-18 01:29:42 +02:00
BONNe1704
3b4a64bb39 Merge changes in develop branch. 2019-02-14 14:31:07 +02:00
BONNe1704
e26c957797 Fix issue with Reward Item changing (#84).
This issue may happened because Player#getInventory()#addItem(ItemStack) tries to add element into existing items in player inventory. If it did not manage to add it, it splits it in parts. This splitting created this issue.
It was fixed, by using clone of reward items, instead of using original elements.
2019-02-14 14:20:08 +02:00
BONNe1704
68b0fa3b2e Improve debugging in Creative GameMode.
Add ability to Creative GameMode complete inventory and exp challenge without necessary items and exp.
2019-02-14 10:28:06 +02:00
BONNe
d33a763cbe Add single method that generates level description. 2019-02-12 15:36:16 +02:00
BONNe
ab3275cd69 Rework Challenges Addon Language structure.
Reorganize structure.
Add missing translations.
Add colors.
2019-02-12 01:38:16 +02:00
BONNe
93a9490cad
Fix some logic issue.
Add proper logic check for invalid Other Type challenges.
- If VaultHook is enabled required money should be more then 0, otherwise challenge is not valid.
- If LevelAddon is exists required level should be more then 0, otherwise challenge is not valid.
- If required experience is less then 0, challenge is not valid.
- If Level addon is missing, nut it requires some level, then challenge is not valid.
- If VaultHook is missing, nut it requires some money, then challenge is not valid.
2019-01-30 19:11:27 +02:00
BONNe
9918752589 Fix issue when completing challenge was not displayed in ChallengesGUI. (#60) 2019-01-28 21:01:26 +02:00
BONNe
7384afa262 Disable broadcast message for user. #62 2019-01-28 20:25:28 +02:00
BONNe
d6a39b2600 Add completion blockage for un-deployed challenges. 2019-01-26 13:58:00 +02:00
BONNe
2a6127b0f6 Remove repeating blockage for Island Challenge type. 2019-01-26 13:53:49 +02:00
BONNe
ab22651425 Fix an issue when users could do challenges in other gamemodes.
Fix an issue when users could complete challenges outside their island.
2019-01-26 13:47:56 +02:00
BONNe
089f09dd45 Implement ChallengeLevel completion rewards.
Add methods isLevelDone() and addCompletedLevel() to ChallengesPlayerData object.
Add isLevelCompleted(), validateLevelCompletion() and setLevelComplete() to ChallengesManager.

Add check in TryToComplete after completing challenges first time.
2019-01-25 00:54:21 +02:00
BONNe
2a4b892ed7 Create EMPTY_RESULT variable to avoid so many new ChallengeResult object initializations. 2019-01-25 00:28:12 +02:00
BONNe
e0f38206aa Add check on permission. 2019-01-25 00:20:33 +02:00
BONNe
0943a48c3c Add Environment check when completing challenge. 2019-01-24 23:57:50 +02:00
BONNe
52b02e06bf Rework TryToComplete class.
Remove unnecessary code.
2019-01-24 23:29:56 +02:00
BONNe1704
590b3f114c Rework ChallengesManager.
Implement all methods that were only placeholders.
Remove all unnecessary old methods.
Implement new methods in all classes.

User and Admin command now opens new GUI.
2019-01-23 17:30:30 +02:00
BONNe1704
f75e4e080c Rework Challenge, ChallengeLevel and ChallengesPlayerData classes.
Challenge now will not know their world, as it is not necessary.
Remove ICON type, as it is useless.
Rename Level to Other, as under it will be not only level things.
Rename slot to order, as it was weird that users could define slot but not order. Order is easier to understand and use.

ChallengesLevel now knows all their levels.
Each challenge level only will be for single world.
Rename some variables.

ChallengesPlayerData was just adapted with changes in challenges and level classes.
2019-01-23 16:33:33 +02:00
BONNe1704
dba5a44461 Rename Challenges and ChallengeLevels classes. 2019-01-23 16:09:38 +02:00
BONNe1704
6c0ac96251 Use proper Addon settings getters. 2019-01-10 11:40:23 +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