Запомни код
package org.dragons.dragonscheck;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import ru.leymooo.antirelog.Antirelog;

public class AnyCheckCommand implements CommandExecutor {

    private final DragonsCheckPlugin plugin;
    private final PlayerEventListener playerEventListener;

    public AnyCheckCommand(DragonsCheckPlugin plugin, PlayerEventListener playerEventListener) {
        this.plugin = plugin;
        this.playerEventListener = playerEventListener;
    }

    private void sendModeratorMessage(Player moderator, String message) {
        moderator.sendMessage(DragonsCheckPlugin.LOGOTYPE + message);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage(ChatColor.RED + "Эту команду может использовать только игрок.");
            return true;
        }

        Player moderator = (Player) sender;

        if (!moderator.isOnGround() || moderator.isFlying()) {
            sendModeratorMessage(moderator, ChatColor.RED + "Вы не можете вызвать игрока на продвинутую проверку, находясь в воздухе.");
            return true;
        }

        if (args.length != 1) {
            sendModeratorMessage(moderator, ChatColor.RED + "Использование: /anycheck <ник>");
            return true;
        }

        if (!moderator.hasPermission("dragonscheck.anycheck")) {
            sendModeratorMessage(moderator, ChatColor.RED + "У вас нет прав на использование этой команды.");
            return true;
        }

        Player target = Bukkit.getPlayerExact(args[0]);
        if (target == null) {
            sendModeratorMessage(moderator, ChatColor.RED + "Игрок не найден.");
            return true;
        }

        if (plugin.getConfig().getBoolean("settings.enableAntiRelogCheck") &&
                Antirelog.getPlugin(Antirelog.class).getPvpManager().isInPvP(target) &&
                !moderator.hasPermission("dragonscheck.bypass")) {
            sendModeratorMessage(moderator, ChatColor.RED + "Игрок находится в PvP!");
            return true;
        }

        if (target.equals(moderator)) {
            sendModeratorMessage(moderator, ChatColor.RED + "Вы не можете вызвать себя на продвинутую проверку.");
            return true;
        }

        if (playerEventListener.isPlayerInCheck(target)) {
            Player currentModerator = playerEventListener.getModeratorCheckingPlayer(target);
            if (currentModerator != null && !currentModerator.equals(moderator)) {
                sendModeratorMessage(moderator, ChatColor.RED + "Игрок уже проверяется модератором " + currentModerator.getName() + ".");
                return true;
            }

            playerEventListener.removePlayerFromCheck(target);
            target.sendTitle(
                    ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("endCheck.title")),
                    ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("endCheck.subtitle")),
                    10, 70, 20
            );
            sendModeratorMessage(moderator, ChatColor.GREEN + "Продвинутая проверка игрока завершена.");
        } else {
            target.teleport(moderator.getLocation());
            playerEventListener.addPlayerToCheck(target, moderator, true); // Advanced check
            plugin.sendAlertToPlayer(target, moderator, "anyCheckMessage");
            sendModeratorMessage(moderator, ChatColor.GREEN + "Игрок вызван на продвинутую проверку.");
        }
        return true;
    }
}

Второй код
package org.dragons.dragonscheck;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import ru.leymooo.antirelog.Antirelog;

public class CheckCommand implements CommandExecutor {

    private final DragonsCheckPlugin plugin;
    private final PlayerEventListener playerEventListener;

    public CheckCommand(DragonsCheckPlugin plugin, PlayerEventListener playerEventListener) {
        this.plugin = plugin;
        this.playerEventListener = playerEventListener;
    }

    private void sendModeratorMessage(Player moderator, String message) {
        moderator.sendMessage(DragonsCheckPlugin.LOGOTYPE + message);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage(ChatColor.RED + "Эту команду может использовать только игрок.");
            return true;
        }

        Player moderator = (Player) sender;

        if (!moderator.isOnGround() || moderator.isFlying()) {
            sendModeratorMessage(moderator, ChatColor.RED + "Вы не можете вызвать игрока на проверку, находясь в воздухе.");
            return true;
        }

        if (args.length != 1) {
            sendModeratorMessage(moderator, ChatColor.RED + "Использование: /check <ник>");
            return true;
        }

        if (!moderator.hasPermission("dragonscheck.check")) {
            sendModeratorMessage(moderator, ChatColor.RED + "У вас нет прав на использование этой команды.");
            return true;
        }

        Player target = Bukkit.getPlayerExact(args[0]);
        if (target == null) {
            sendModeratorMessage(moderator, ChatColor.RED + "Игрок не найден.");
            return true;
        }

        if (plugin.getConfig().getBoolean("settings.enableAntiRelogCheck") &&
                Antirelog.getPlugin(Antirelog.class).getPvpManager().isInPvP(target) &&
                !moderator.hasPermission("dragonscheck.bypass")) {
            sendModeratorMessage(moderator, ChatColor.RED + "Игрок находится в PvP!");
            return true;
        }

        if (target.equals(moderator)) {
            sendModeratorMessage(moderator, ChatColor.RED + "Вы не можете вызвать себя на проверку.");
            return true;
        }

        if (playerEventListener.isPlayerInCheck(target)) {
            Player currentModerator = playerEventListener.getModeratorCheckingPlayer(target);
            if (currentModerator != null && !currentModerator.equals(moderator)) {
                sendModeratorMessage(moderator, ChatColor.RED + "Игрок уже проверяется модератором " + currentModerator.getName() + ".");
                return true;
            }

            playerEventListener.removePlayerFromCheck(target);
            target.sendTitle(
                    ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("endCheck.title")),
                    ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("endCheck.subtitle")),
                    10, 70, 20
            );
            sendModeratorMessage(moderator, ChatColor.GREEN + "Проверка игрока завершена.");
        } else {
            target.teleport(moderator.getLocation());
            playerEventListener.addPlayerToCheck(target, moderator, false); // Regular check
            plugin.sendAlertToPlayer(target, moderator, "checkMessage");
            sendModeratorMessage(moderator, ChatColor.GREEN + "Игрок вызван на проверку.");
        }
        return true;
    }
}

Третий код
package org.dragons.dragonscheck;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.List;

public class DragonsCheckPlugin extends JavaPlugin {

    private PlayerEventListener playerEventListener;
    public static final String LOGOTYPE = ChatColor.GOLD + "Проверки" + ChatColor.GRAY + " » ";

    @Override
    public void onEnable() {
        this.saveDefaultConfig();
        playerEventListener = new PlayerEventListener(this);

        if (getCommand("check") != null) {
            getCommand("check").setExecutor(new CheckCommand(this, playerEventListener));
        }
        if (getCommand("anycheck") != null) {
            getCommand("anycheck").setExecutor(new AnyCheckCommand(this, playerEventListener));
        }
        if (getCommand("mod") != null) {
            getCommand("mod").setExecutor(new ModCommand(this, playerEventListener));
        }

        getServer().getPluginManager().registerEvents(playerEventListener, this);
    }

    public void sendAlertToPlayer(Player player, Player moderator, String messagePath) {
        try {
            Bukkit.getLogger().info("Sending alert to player " + player.getName() + " using path " + messagePath);

            String title = this.getConfig().getString(messagePath + ".title");
            String subtitle = this.getConfig().getString(messagePath + ".subtitle");
            List<String> messages = this.getConfig().getStringList(messagePath + ".messages");

            if (title == null || subtitle == null || messages == null || messages.isEmpty()) {
                Bukkit.getLogger().warning("Missing configuration for path: " + messagePath);
                return;
            }

            title = ChatColor.translateAlternateColorCodes('&', title.replace("%checker%", moderator.getName()));
            subtitle = ChatColor.translateAlternateColorCodes('&', subtitle.replace("%checker%", moderator.getName()));

            player.sendTitle(title, subtitle, 10, 70, 20);

            for (String msg : messages) {
                player.sendMessage(ChatColor.translateAlternateColorCodes('&', msg.replace("%checker%", moderator.getName())));
            }

            Bukkit.getLogger().info("Messages sent to player: " + player.getName());
        } catch (Exception e) {
            Bukkit.getLogger().severe("Error sending alert to player: " + e.getMessage());
            e.printStackTrace();
        }
    }

    public void alertModerator(Player moderator, Player target, String message) {
        String formattedMessage = ChatColor.translateAlternateColorCodes('&',
                this.getConfig().getString("specialChatFormat")
                        .replace("%player%", target.getName())
                        .replace("%message%", message)
                        .replace("%checker%", moderator.getName()));
        moderator.sendMessage(formattedMessage);
    }
}

Четвертый
package org.dragons.dragonscheck;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class ModCommand implements CommandExecutor {

    private final DragonsCheckPlugin plugin;
    private final PlayerEventListener playerEventListener;

    public ModCommand(DragonsCheckPlugin plugin, PlayerEventListener playerEventListener) {
        this.plugin = plugin;
        this.playerEventListener = playerEventListener;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage(ChatColor.RED + "Эту команду может использовать только игрок.");
            return true;
        }

        Player player = (Player) sender;

        if (!player.hasPermission("dragonscheck.mod")) {
            player.sendMessage(ChatColor.RED + "У вас нет прав на использование этой команды.");
            return true;
        }

        if (!playerEventListener.isPlayerInCheck(player)) {
            player.sendMessage(ChatColor.RED + "Вы не можете использовать эту команду из-за того что вы не находитесь на проверке.");
            return true;
        }

        if (args.length == 0) {
            player.sendMessage(ChatColor.RED + "Использование: /mod <сообщение>");
            return true;
        }

        Player moderator = playerEventListener.getModeratorCheckingPlayer(player);
        if (moderator == null) {
            player.sendMessage(ChatColor.RED + "Ошибка: модератор не найден.");
            return true;
        }

        String message = String.join(" ", args);
        plugin.alertModerator(moderator, player, message);
        player.sendMessage(ChatColor.GRAY + "Ваше сообщение отправлено модератору.");

        return true;
    }
}

Пятый
package org.dragons.dragonscheck;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.player.*;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class PlayerEventListener implements Listener {

    private final DragonsCheckPlugin plugin;
    private final Map<UUID, Player> checkedPlayers = new HashMap<>();
    private final Map<UUID, Boolean> advancedCheckPlayers = new HashMap<>();

    public PlayerEventListener(DragonsCheckPlugin plugin) {
        this.plugin = plugin;
    }

    public void addPlayerToCheck(Player player, Player moderator, boolean isAdvanced) {
        checkedPlayers.put(player.getUniqueId(), moderator);
        advancedCheckPlayers.put(player.getUniqueId(), isAdvanced);
    }

    public void removePlayerFromCheck(Player player) {
        checkedPlayers.remove(player.getUniqueId());
        advancedCheckPlayers.remove(player.getUniqueId());
    }

    public boolean isPlayerInCheck(Player player) {
        return checkedPlayers.containsKey(player.getUniqueId());
    }

    public boolean isAdvancedCheck(Player player) {
        return advancedCheckPlayers.getOrDefault(player.getUniqueId(), false);
    }

    public Player getModeratorCheckingPlayer(Player player) {
        return checkedPlayers.get(player.getUniqueId());
    }

    public void alertPlayerForDeniedAction(Player player, String phaseKey) {
        String title = ChatColor.translateAlternateColorCodes('&',
                plugin.getConfig().getString("deniedAction." + phaseKey + ".title"));
        String subtitle = ChatColor.translateAlternateColorCodes('&',
                plugin.getConfig().getString("deniedAction." + phaseKey + ".subtitle"));
        player.sendTitle(title, subtitle, 10, 70, 20);
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        if (isPlayerInCheck(player)) {
            event.setCancelled(true);
            String phaseKey = isAdvancedCheck(player) ? "anyCheck" : "check";
            alertPlayerForDeniedAction(player, phaseKey);
        }
    }

    @EventHandler
    public void onPlayerDamage(EntityDamageEvent event) {
        if (event.getEntity() instanceof Player) {
            Player player = (Player) event.getEntity();
            if (isPlayerInCheck(player)) {
                event.setCancelled(true);
                String phaseKey = isAdvancedCheck(player) ? "anyCheck" : "check";
                alertPlayerForDeniedAction(player, phaseKey);
            }
        }
    }

    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        if (isPlayerInCheck(player) && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)) {
            event.setCancelled(true);
            String phaseKey = isAdvancedCheck(player) ? "anyCheck" : "check";
            alertPlayerForDeniedAction(player, phaseKey);
        }
    }

    @EventHandler
    public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
        Player player = event.getPlayer();
        if (isPlayerInCheck(player)) {
            if (event.getMessage().startsWith("/mod")) {
                event.setCancelled(true);
                String message = event.getMessage().substring(4).trim();
                Player moderator = getModeratorCheckingPlayer(player);
                if (moderator != null) {
                    plugin.alertModerator(moderator, player, message);
                    player.sendMessage(ChatColor.GRAY + "Ваше сообщение отправлено модератору.");
                } else {
                    player.sendMessage(ChatColor.RED + "Ошибка: модератор не найден.");
                }
            } else {
                event.setCancelled(true);
                String phaseKey = isAdvancedCheck(player) ? "anyCheck" : "check";
                alertPlayerForDeniedAction(player, phaseKey);
            }
        }
    }

    @EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event) {
        Player player = event.getPlayer();
        if (isPlayerInCheck(player)) {
            event.setCancelled(true);
            Player moderator = getModeratorCheckingPlayer(player);
            if (moderator != null) {
                String message = event.getMessage();
                plugin.alertModerator(moderator, player, message);
                player.sendMessage(ChatColor.GRAY + "Ваше сообщение отправлено модератору.");
            }
        }
    }

    @EventHandler
    public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
        Entity damager = event.getDamager();
        if (damager instanceof Player) {
            Player player = (Player) damager;
            if (isPlayerInCheck(player)) {
                event.setCancelled(true);
                String phaseKey = isAdvancedCheck(player) ? "anyCheck" : "check";
                alertPlayerForDeniedAction(player, phaseKey);
            }
        }
    }

    @EventHandler
    public void onPlayerQuit(PlayerQuitEvent event) {
        Player player = event.getPlayer();
        if (isPlayerInCheck(player)) {
            Player moderator = getModeratorCheckingPlayer(player);
            if (moderator != null) {
                String duration = plugin.getConfig().getString("banMessage.duration");
                String reason = plugin.getConfig().getString("banMessage.reason");

                String banCommand = "ban " + player.getName() + " " + duration + " " + reason;
                Bukkit.getLogger().info("[Debug] Executing moderator command: " + banCommand);

                moderator.performCommand(banCommand);
                removePlayerFromCheck(player);
            } else {
                Bukkit.getLogger().warning("[Debug] Moderator not found for banning player " + player.getName());
            }
        }
    }
}


Сделай чтобы игрок находящийся на проверке и продвинутой проверке не мог ничего выкидывать из инвентаря и предоставь полный код который ты изменил