File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
java/org/kasun/opprotector Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public class MainConfig {
45
45
notify_op_leave ,
46
46
notify_auth_success ,
47
47
notify_auth_failed ,
48
+ tfa_enabled ,
48
49
notify_unauth_access ;
49
50
50
51
@@ -83,6 +84,7 @@ private void loadPasswordSettings(){
83
84
interval_secounds = password .getInt ("interval-secounds" );
84
85
use_gui = password .getBoolean ("use-gui" );
85
86
encrypt_passwords = password .getBoolean ("encrypt-passwords" );
87
+ tfa_enabled = password .getBoolean ("2fa-enabled" );
86
88
}
87
89
88
90
private void loadLockdownSettings (){
Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ public void start(Player player){
97
97
}
98
98
99
99
public void setTo2FA (Player player ){
100
+
101
+ if (!plugin .getMainManager ().getConfigManager ().getMainConfig ().tfa_enabled ){
102
+ setVerified (player );
103
+ }
104
+
100
105
passwordFlash .stopTasks ();
101
106
verificationStatusMap .put (player .getName (), VerificationStatus .IN_FACTOR_VERIFICATION );
102
107
plugin .getMainManager ().getAuthorizedPlayers ().addAuthorizedPlayer (player );
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ password-settings:
18
18
interval-secounds : 20
19
19
pas-command : " pas"
20
20
encrypt-passwords : true
21
+ 2fa-enabled : true
21
22
22
23
# ===============================================================================
23
24
# Lockdown Settings
You can’t perform that action at this time.
0 commit comments