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:
BONNe1704 2019-05-16 10:30:01 +03:00
parent 34ed09e768
commit 9704ed32aa
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}