mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-02 08:40:01 +01:00
Do not prevent checks if captcha has been filled.
This commit is contained in:
parent
bac6ce8501
commit
7222dee529
@ -167,7 +167,7 @@ public class NoPwnage extends Check {
|
|||||||
|
|
||||||
boolean cancel = false;
|
boolean cancel = false;
|
||||||
|
|
||||||
if (!data.noPwnageHasFilledCaptcha) {
|
|
||||||
String message = "";
|
String message = "";
|
||||||
if (event instanceof AsyncPlayerChatEvent)
|
if (event instanceof AsyncPlayerChatEvent)
|
||||||
message = ((AsyncPlayerChatEvent) event).getMessage();
|
message = ((AsyncPlayerChatEvent) event).getMessage();
|
||||||
@ -176,6 +176,7 @@ public class NoPwnage extends Check {
|
|||||||
final boolean isCommand = event instanceof PlayerCommandPreprocessEvent;
|
final boolean isCommand = event instanceof PlayerCommandPreprocessEvent;
|
||||||
final long now = System.currentTimeMillis();
|
final long now = System.currentTimeMillis();
|
||||||
|
|
||||||
|
if (!data.noPwnageHasFilledCaptcha) {
|
||||||
if (cc.noPwnageCaptchaCheck && data.noPwnageHasStartedCaptcha) {
|
if (cc.noPwnageCaptchaCheck && data.noPwnageHasStartedCaptcha) {
|
||||||
// Correct answer to the captcha?
|
// Correct answer to the captcha?
|
||||||
if (message.equals(data.noPwnageGeneratedCaptcha)) {
|
if (message.equals(data.noPwnageGeneratedCaptcha)) {
|
||||||
@ -205,6 +206,7 @@ public class NoPwnage extends Check {
|
|||||||
((PlayerCommandPreprocessEvent) event).setCancelled(true);
|
((PlayerCommandPreprocessEvent) event).setCancelled(true);
|
||||||
return cancel;
|
return cancel;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (data.noPwnageLastLocation == null)
|
if (data.noPwnageLastLocation == null)
|
||||||
data.noPwnageLastLocation = player.getLocation();
|
data.noPwnageLastLocation = player.getLocation();
|
||||||
@ -293,7 +295,7 @@ public class NoPwnage extends Check {
|
|||||||
data.noPwnageLastMessageTime = now;
|
data.noPwnageLastMessageTime = now;
|
||||||
lastGlobalMessage = message;
|
lastGlobalMessage = message;
|
||||||
lastGlobalMessageTime = now;
|
lastGlobalMessageTime = now;
|
||||||
}
|
|
||||||
|
|
||||||
return cancel;
|
return cancel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user