mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-28 13:36:06 +01:00
Fixes #265
This commit is contained in:
parent
7215e88706
commit
e1f27c88bd
@ -26,8 +26,13 @@ public class ResetListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onIslandReset(IslandEvent e) {
|
||||
if (e.getReason().equals(Reason.CREATED) || (addon.getChallengesSettings().isResetChallenges() && e.getReason().equals(Reason.RESETTED))) {
|
||||
addon.getChallengesManager().resetAllChallenges(e.getOwner(), e.getLocation().getWorld(), e.getOwner());
|
||||
if (addon.getChallengesSettings().isResetChallenges())
|
||||
{
|
||||
if (e.getReason().equals(IslandEvent.Reason.CREATED) ||
|
||||
e.getReason().equals(IslandEvent.Reason.RESETTED) ||
|
||||
e.getReason().equals(IslandEvent.Reason.REGISTERED)) {
|
||||
addon.getChallengesManager().resetAllChallenges(e.getOwner(), e.getLocation().getWorld(), e.getOwner());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user