mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-22 18:46:39 +01:00
Fix issue when IslandTypeChallenges required blocks were cleared if completion was uncessesfull.
The issue was that it cleared wrong map. It must clear priority queue, but cleared required elements.
This commit is contained in:
parent
34ed09e768
commit
9704ed32aa
@ -162,7 +162,9 @@ public class TryToComplete
|
||||
this.permissionPrefix = permissionPrefix;
|
||||
this.user = user;
|
||||
this.manager = addon.getChallengesManager();
|
||||
this.challenge = challenge;
|
||||
// To avoid any modifications that may accure to challenges in current completion
|
||||
// just clone it.
|
||||
this.challenge = challenge.clone();
|
||||
this.topLabel = topLabel;
|
||||
}
|
||||
|
||||
@ -1021,7 +1023,7 @@ public class TryToComplete
|
||||
// kick garbage collector
|
||||
blocks.clear();
|
||||
blocksFound.clear();
|
||||
requiredMap.clear();
|
||||
blockFromWorld.clear();
|
||||
|
||||
return EMPTY_RESULT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user