mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-24 11:36:53 +01:00
Add protection code in TryToComplete task, to avoid negative numbers in max completion times.
This commit is contained in:
parent
4e2181f524
commit
ca5ff504f0
@ -510,6 +510,11 @@ public class TryToComplete
|
||||
this.user.sendMessage("challenges.errors.not-deployed");
|
||||
result = EMPTY_RESULT;
|
||||
}
|
||||
else if (maxTimes < 1)
|
||||
{
|
||||
this.user.sendMessage("challenges.errors.not-valid-integer");
|
||||
result = EMPTY_RESULT;
|
||||
}
|
||||
else if (Util.getWorld(this.world) != Util.getWorld(this.user.getWorld()) ||
|
||||
!this.challenge.getUniqueId().startsWith(Util.getWorld(this.world).getName()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user