The issue was that I used wrong command to check island owner. It is fixed.
Also added 2 protective code, that prevents from trying to select large areas for block searching.
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.
Remove AnvilGUI, as it is broken. Replaced with Spigot Conversation API.
Remove lore-config from GUI (broken).
Remove RIGHT_CLICK to complete multiple times (broken).
This is old change that was declined (#105), but unfortunately it is necessary.
If every ID is based on world names, than addon cannot process "/" in it. It mean that worlds cannot be put into different folders.
This change will fix it, but it is not completed.
In progress.
There does not exist converter, so old data is not usable with this version.
It looks like, exist plugins that keep capital letters in world names. That mean, it is not correct to lowercasing any id's.
To fix it, now, instead of lowercasing, challenges should be case insensitive.
This request comes from Discord.
It also mention to format DiskDrive to avoid ability to restore database, but it is not implemented yet. Will be implemented in future releases.
Add code that removes challenges level from all its challenges, if level is deleted.
Add protection code that shows admins that something is not correct if challenge level is not in database.
* 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.
Add settings option that can enable/disable title message and its length.
Add ability to edit these settings via admin GUI.
Add ability to use some variables in title and subtitle in translation files.
Now it will call also manager.reload() that clears cache and resets database links.
Improve ReloadCommand. Now it will be able to reload both ways (soft way that clears only cache, and hard way that reassigns database connection) with reload command.
Remove world name from challenge and challenge level ids when default file is created.
Reassign correct world name to unique id when challenges and levels are loaded.
This issue happens because there were an issue with detecting if enough items are in player inventory. Each new required item stack forgets abouts previous founding.
Also it marked challenge as completed after items were failed to remove.
- Implement LockedIcon in ChallengeLevel (can be null)
- Implement defaultLockedIcon in Settings (can be overwritten by ChallengeLevel)
- Reformat Config File. !!!
- Challenge Data Request handler - returns data map about requested challenge;
- Level Data Request handler - returns data map about requested level;
- Challenge List Request handler - returns list of challenges that operates in requested world;
- Level List Request handler - returns list of levels that operates in requested world;
- Completed Challenges Request handler - returns set of completed challenges for requested user in requested world.
- CompletedEvent: fires when challenge/level is competed
- ResetEvent: fires when challenge is reset
- ResetAllEvent: fires when all challenges data in world is reset
In configuration add ability to add lifespan to history data. Data that will be older then configured values, will be removed from database.
This operation will happen only on player data save operation.
Create a new Flag Challenges Protection (#93), that allows to define which users can complete challenges on island.
Create a new Flag Challenges Island Limitation (#95), that allows to disable check for users to be on their islands for completing challenge.
Add ability to enable Single GUI in config.
Add configurable admin and player method (in config) that will open GUI with GameModes.
Add ability to define default player GameMode GUI.
Add new commands that will process config options.
- Add new variable "history" in ChallengesPlayerData.
- Add new methods in ChallengesManager that populates LogEntry and adds it to history variable.
- Add ability to enable/disable history storing in config (default: disabled).
- Fix issue when resetAllChallenges resets only caller challenges.
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.
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.
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.