Package fr.neatmonster.nocheatplus.command

Examples of fr.neatmonster.nocheatplus.command.NoCheatPlusCommand


            processQueuedSubComponentHolders();
        }

        // Register the commands handler.
        final PluginCommand command = getCommand("nocheatplus");
        final NoCheatPlusCommand commandHandler = new NoCheatPlusCommand(this, notifyReload);
        command.setExecutor(commandHandler);
        // (CommandHandler is TabExecutor.)

        // Set up the tick task.
        TickTask.start(this);

        this.dataManTaskId  = Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
            @Override
            public void run() {
                dataMan.checkExpiration();
            }
        }, 1207, 1207);

        // Set up consistency checking.
        scheduleConsistencyCheckers();

        //        if (config.getBoolean(ConfPaths.MISCELLANEOUS_CHECKFORUPDATES)){
        //            // Is a new update available?
        //          final int timeout = config.getInt(ConfPaths.MISCELLANEOUS_UPDATETIMEOUT, 4) * 1000;
        //          getServer().getScheduler().scheduleAsyncDelayedTask(this, new Runnable() {
        //        @Override
        //        public void run() {
        //          updateAvailable = Updates.checkForUpdates(getDescription().getVersion(), timeout);
        //        }
        //      });
        //        }

        // Is the version the configuration was created with consistent with the current one?
        configProblems = Updates.isConfigUpToDate(config);
        if (configProblems != null && config.getBoolean(ConfPaths.CONFIGVERSION_NOTIFY)){
            // Could use custom prefix from logging, however ncp should be mentioned then.
            LogUtil.logWarning("[NoCheatPlus] " + configProblems);
        }

        // Care for already online players.
        final Player[] onlinePlayers = getServer().getOnlinePlayers();
        // TODO: re-map ExemptionManager !
        // TODO: Disable all checks for these players for one tick ?
        // TODO: Prepare check data for players [problem: permissions]?
        Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
            @Override
            public void run() {
                postEnable(onlinePlayers,
                        new Runnable() {
                    @Override
                    public void run() {
                        // Set child permissions for commands for faster checking.
                        PermissionUtil.addChildPermission(commandHandler.getAllSubCommandPermissions(), Permissions.FILTER_COMMAND_NOCHEATPLUS, PermissionDefault.OP);
                    }
                },
                new Runnable() {
                    @Override
                    public void run() {
View Full Code Here

TOP

Related Classes of fr.neatmonster.nocheatplus.command.NoCheatPlusCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.