Skip to content

Commit

Permalink
Fixed LiveScanner
Browse files Browse the repository at this point in the history
  • Loading branch information
ka0un committed Mar 20, 2024
1 parent 398a800 commit 8b39f25
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/main/java/org/kasun/opprotector/Scanner/LiveScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,28 @@ private void scanPlayer(Player player, ConcurrentHashMap<String, VerificationSta
}

private void executeCommandsAndBanPlayer(Player player, String banReason, String logReason, OPProtector plugin) {
List<String> commands = plugin.getMainManager().getConfigManager().getMainConfig().not_in_operators_list;
CommandExecutor commandExecutor = new CommandExecutor(player, commands);
Ban ban = new Ban(player, banReason, logReason);
plugin.getMainManager().getLog().banned(player, logReason);

new BukkitRunnable() {
@Override
public void run() {
List<String> commands = plugin.getMainManager().getConfigManager().getMainConfig().not_in_operators_list;
CommandExecutor commandExecutor = new CommandExecutor(player, commands);
Ban ban = new Ban(player, banReason, logReason);
plugin.getMainManager().getLog().banned(player, logReason);
}
}.runTask(plugin);


}

private void verify(Player player, OPProtector plugin) {
VerificationProcessManager verificationProcessManager = plugin.getMainManager().getVerificationProcessManager();
verificationProcessManager.start(player);
new BukkitRunnable() {
@Override
public void run() {
VerificationProcessManager verificationProcessManager = plugin.getMainManager().getVerificationProcessManager();
verificationProcessManager.start(player);
}
}.runTask(plugin);
}

public void stop() {
Expand Down

0 comments on commit 8b39f25

Please sign in to comment.