name: ACLight
version: 1.0
description: Detect and fight the exploitation of various flaws/bugs in Minecraft.

author: NeatMonster
authors: [tacgamingpro, blockcube]
website: 
dev-url: 

main: fr.neatmonster.aclight.aclight
api-version: 1.13

softdepend:
- ProtocolLib
- Carbon

commands:
    acl:
        aliases: [acl]
        description: ACLight command(s).
        # permissions: aclight.admin.(...)
        usage: |
               Administrative commands overview:
               /<command> top (entries) (check/s...) (sort by...) NEW.
               /<command> info (player): Violation summary for a player.
               /<command> inspect (player): Status info for a player.
               /<command> notify on|off: In-game notifications per player.
               /<command> removeplayer (player) [(check type)]: Remove data.
               /<command> reload: Reload the configuration.
               /<command> lag: Lag-related info.
               /<command> version: Version information.
               /<command> commands: List all commands, adds rarely used ones.

permissions:
    # Check silent permissions (no log alerts if present).
    aclight.checks.blockbreak.break.silent:
        default: false
    aclight.checks.blockbreak.direction.silent:
        default: false
    aclight.checks.blockbreak.fastbreak.silent:
        default: false
    aclight.checks.blockbreak.frequency.silent:
        default: false
    aclight.checks.blockbreak.noswing.silent:
        default: false
    aclight.checks.blockbreak.reach.silent:
        default: false
    aclight.checks.blockbreak.wrongblock.silent:
        default: false
    aclight.checks.blockinteract.direction.silent:
        default: false
    aclight.checks.blockinteract.reach.silent:
        default: false
    aclight.checks.blockinteract.speed.silent:
        default: false
    aclight.checks.blockinteract.visible.silent:
        default: false
    aclight.checks.blockplace.against.silent:
        default: false
    aclight.checks.blockplace.autosign.silent:
        default: false
    aclight.checks.blockplace.direction.silent:
        default: false
    aclight.checks.blockplace.fastplace.silent:
        default: false
    aclight.checks.blockplace.noswing.silent:
        default: false
    aclight.checks.blockbreak.reach.silent:
        default: false
    aclight.checks.blockplace.speed.silent:
        default: false
    aclight.checks.chat.captcha.silent:
        default: false
    aclight.checks.chat.color.silent:
        default: false
    aclight.checks.chat.commands.silent:
        default: false
    aclight.checks.chat.text.silent:
        default: false
    aclight.checks.chat.logins.silent:
        default: false
    aclight.checks.chat.relog.silent:
        default: false
    aclight.checks.combined.bedleave.silent:
        default: false
    aclight.checks.combined.improbable.silent:
        default: false
    aclight.checks.combined.munchhausen.silent:
        default: false
    aclight.checks.fight.angle.silent:
        default: false
    aclight.checks.fight.critical.silent:
        default: false
    aclight.checks.fight.direction.silent:
        default: false
    aclight.checks.fight.fastheal.silent:
        default: false
    aclight.checks.fight.godmode.silent:
        default: false
    aclight.checks.fight.noswing.silent:
        default: false
    aclight.checks.fight.reach.silent:
        default: false
    aclight.checks.fight.selfhit.silent:
        default: false
    aclight.checks.fight.speed.silent:
        default: false
    aclight.checks.fight.wrongturn.silent:
        default: false
    aclight.checks.inventory.drop.silent:
        default: false
    aclight.checks.inventory.fastclick.silent:
        default: false
    aclight.checks.inventory.fastconsume.silent:
        default: false
    aclight.checks.inventory.gutenberg.silent:
        default: false
    aclight.checks.inventory.instantbow.silent:
        default: false
    aclight.checks.inventory.instanteat.silent:
        default: false
    aclight.checks.inventory.items.silent:
        default: false
    aclight.checks.inventory.open.silent:
        default: false
    aclight.checks.moving.creativefly.silent:
        default: false
    aclight.checks.moving.morepackets.silent:
        default: false
    aclight.checks.moving.nofall.silent:
        default: false
    aclight.checks.moving.passable.silent:
        default: false
    aclight.checks.moving.survivalfly.silent:
        default: false
    aclight.checks.moving.vehicle.silent:
        default: false
    aclight.checks.moving.vehicle.morepackets.silent:
        default: false
    aclight.checks.moving.vehicle.envelope.silent:
        default: false
    aclight.checks.net.attackfrequency.silent:
        default: false
    aclight.checks.net.flyingfrequency.silent:
        default: false
    aclight.checks.net.keepalivefrequency.silent:
        default: false
    aclight.checks.net.packetfrequency.silent:
        default: false
    # Check bypass permissions:
    aclight.checks:
        description: Allow the player to bypass all checks.
        children:
            aclight.checks.blockbreak:
                description: Allow the player to bypass all BlockBreak checks.
                children:
                    aclight.checks.blockbreak.break:
                        description: Allow the player to break special blocks.
                        children:
                          aclight.checks.blockbreak.break.liquid:
                            description: Allow players to break liquid.
                    aclight.checks.blockbreak.direction:
                        description: Allow the player to bypass to Direction check.
                    aclight.checks.blockbreak.fastbreak:
                        description: Allow the player to bypass the FastBreak check.
                    aclight.checks.blockbreak.frequency:
                        description: Allow the player to bypass the Frequency check.
                    aclight.checks.blockbreak.noswing:
                        description: Allow the player to bypass the NoSwing check.
                    aclight.checks.blockbreak.reach:
                        description: Allow the player to bypass the Reach check.
                    aclight.checks.blockbreak.wrongblock:
                        description: Allow the player to bypass the WorngBlock check.
            aclight.checks.blockinteract:
                description: Allow the player to bypass all BlockInteract checks.
                children:
                    aclight.checks.blockinteract.direction:
                        description: Allow the player to bypass to Direction check.
                    aclight.checks.blockinteract.reach:
                        description: Allow the player to bypass the Reach check.
                    aclight.checks.blockinteract.speed:
                        description: Allow the player to bypass the Speed check.
                    aclight.checks.blockinteract.visible:
                        description: Allow the player to bypass the Visible check.
            aclight.checks.blockplace:
                description: Allow the player to bypass all BlockPlace checks.
                children:
                    aclight.checks.blockplace.against:
                        description: Allow the player to place blocks against other blocks.
                        children:
                            aclight.checks.blockplace.against.liquids:
                                description: Allow the player to place blocks against liquids.
                            aclight.checks.blockplace.against.air:
                                description: Allow the player to place blocks against air.
                    aclight.checks.blockplace.autosign:
                        description: Allow bypassing the autosign check.
                    aclight.checks.blockplace.boatsanywhere:
                        description: Allow the player to place boats on the ground.
                    aclight.checks.blockplace.direction:
                        description: Allow the player to bypass to Direction check.
                    aclight.checks.blockplace.fastplace:
                        description: Allow the player to bypass the FastPlace check.
                    aclight.checks.blockplace.noswing:
                        description: Allow the player to bypass the NoSwing check.
                    aclight.checks.blockplace.reach:
                        description: Allow the player to bypass the Reach check.
                    aclight.checks.blockplace.speed:
                        description: Allow the player to bypass the Speed check.
            aclight.checks.chat:
                description: Allow the player to bypass all Chat checks.
                children:
                    aclight.checks.chat.captcha:
                        description: Allow the player to bypass the captcha check (currently the text/commands violation handling would replace it!).
                    aclight.checks.chat.color:
                        description: Allow the player to bypass the Color check.
                    aclight.checks.chat.commands:
                        description: Allow the player to bypass the commands check.
                    aclight.checks.chat.logins:
                        description: Allow the player to bypass the logins check.
                    aclight.checks.chat.relog:
                        description: Allow the player to bypass the relog check.
                    aclight.checks.chat.text:
                        description: Allow the player to bypass the text check.
            aclight.checks.combined:
                description: Allow the player to bypass all combined checks.
                children:
                     aclight.checks.combined.bedleave:
                         description: Allow to bypass the bedleave check (fly, god).
                     aclight.checks.combined.improbable:
                         description: Allow the player to bypass the Improbable check.
                     aclight.checks.combined.munchhausen:
                         description: Allow flying with fishing rods! The check is deactivated by default, though.
            aclight.checks.fight:
                description: Allow the player to bypass all Fight checks.
                children:
                    aclight.checks.fight.angle:
                        description: Allow the player to bypass the Angle check.
                    aclight.checks.fight.critical:
                        description: Allow the player to bypass the Critical check.
                    aclight.checks.fight.direction:
                        description: Allow the player to bypass the Direction check.
                    aclight.checks.fight.fastheal:
                        description: Allow the player to bypass the FastHeal check.
                    aclight.checks.fight.godmode:
                        description: Allow the player to bypass the GodMode check.
                    aclight.checks.fight.noswing:
                        description: Allow the player to bypass the NoSwing check.
                    aclight.checks.fight.reach:
                        description: Allow the player to bypass the Reach check.
                    aclight.checks.fight.selfhit:
                        description: Allow the player to bypass the SelfHit check.
                    aclight.checks.fight.speed:
                        description: Allow the player to bypass the Speed check.
                    aclight.checks.fight.wrongturn:
                        description: Allow the player to bypass the WrongTurn check.
            aclight.checks.inventory:
                description: Allow the player to bypass all Inventory checks.
                children:
                    aclight.checks.inventory.drop:
                        description: Allow the player to bypass the Drop check.
                    aclight.checks.inventory.fastclick:
                        description: Allow the player to bypass the FastClick check.
                    aclight.checks.inventory.fastconsume:
                        description: Allow to bypass the FastConsume check.
                    aclight.checks.inventory.gutenberg:
                        description: Allow to bypass the Gutenberg check.
                    aclight.checks.inventory.instantbow:
                        description: Allow the player to bypass the InstantBow check.
                    aclight.checks.inventory.instanteat:
                        description: Allow the player to bypass the InstantEat check.
                    aclight.checks.inventory.items:
                        description: Allow the player to bypass the items check (illegal enchantments/dupes).
                    aclight.checks.inventory.open:
                        description: Check for open inventories on special transitions, such as teleportation.
            aclight.checks.moving:
                description: Allow the player to bypass all Moving checks.
                children:
                    aclight.checks.moving.creativefly:
                        description: Allow the player to bypass the CreativeFly check.
                        children:
                            aclight.checks.moving.survivalfly: true
                    aclight.checks.moving.morepackets:
                        description: Allow the player to bypass the MorePackets check.
                    aclight.checks.moving.morepacketsvehicle:
                        description: "Legacy permission! Use instead: aclight.checks.moving.vehicle.morepackets"
                        children:
                            aclight.checks.moving.vehicle.morepackets: true
                    aclight.checks.moving.nofall:
                        description: Allow the player to bypass the NoFall check.
                    aclight.checks.moving.passable:
                        description: Allow bypassing the Passable check.
                    aclight.checks.moving.survivalfly:
                        description: Allow the player to bypass the SurvivalFly check.
                        children:
                            aclight.checks.moving.survivalfly.blocking:
                                description: Allow the player to move without speed limits and to attack entities while blocking.
                            aclight.checks.moving.survivalfly.sneaking:
                                description: Allow the player to move without speed limits while sneaking.
                            aclight.checks.moving.survivalfly.speeding:
                                description: Allow the player to move at higher speeds.
                            aclight.checks.moving.survivalfly.sprinting:
                                description: Allow the player to sprint backwards.
                            aclight.checks.moving.survivalfly.step:
                                description: Allow the player to use the 'step' functionality of his client.
                    aclight.checks.moving.vehicle:
                        description: Allow bypassing all checks for players moving as passengers of vehicles/other.
                        children:
                            aclight.checks.moving.vehicle.morepackets:
                                description: Allow bypassing the morepackets check for vehicles.
                            aclight.checks.moving.vehicle.envelope:
                                description: Allow bypassing the moving envelope check for vehicles.
            aclight.checks.net:
              description: Allow a player to bypass the net (packet) checks.
              children:
                aclight.checks.net.attackfrequency:
                  description: Bypass the AttackFrequency check (attack speed).
                aclight.checks.net.flyingfrequency:
                  description: Bypass the FlyingFrequency check (flying packet spam).
                aclight.checks.net.keepalivefrequency:
                  description: Bypass the KeepAliveFrequency check (keep alive packet spam).
                aclight.checks.net.packetfrequency:
                  description: Bypass the PacketFrequency check (overall packet spam).
    
    aclight.mods:
        description: Allow the player to use all the client mods.
        children:
            aclight.mods.cjb:
                description: Allow the player to use the CJB mod.
                children:
                    aclight.mods.cjb.fly:
                        description: Allow the player to use CJB's fly mod.
                    aclight.mods.cjb.radar:
                        description: Allow the player to use CJB's radar.
                    aclight.mods.cjb.xray:
                        description: Allow the player to use CJB's xray.
            aclight.mods.journey:
                description: Allow players too use mapping features of the JourneyMap mod (Same codes as VoxelMap).
                children:
                    aclight.mods.journey.radar:
                        description: Radar features (JourneyMap, VoxelMap).
                    aclight.mods.journey.cavemap:
                        description: Cave map features (JourneyMap, VoxelMap).
            aclight.mods.minecraftautomap:
                description: Allow the player to use the Minecraft AutoMap mod.
                children:
                    aclight.mods.minecraftautomap.cave:
                        description: Allow the player to use Minecraft AutoMap's cave mode.
                    aclight.mods.minecraftautomap.ores:
                        description: Allow the player to use Minecraft AutoMap's ores detector.
                    aclight.mods.minecraftautomap.radar:
                        description: Allow the player to use Minecraft AutoMap's radar.
            aclight.mods.rei:
                description: Allow the player to use the Rei's Minimap mod.
                children:
                    aclight.mods.rei.cave:
                        description: Allow the player to use Rei's Minimap cave mode.
                    aclight.mods.rei.radar:
                        description: Allow the player to use Rei's Minimap radar.
                        children:
                            aclight.mods.rei.radar.player:
                                description: Allow the player to use Rei's Minimap player radar
                            aclight.mods.rei.radar.animal:
                                description: Allow the player to use Rei's Minimap animal radar
                            aclight.mods.rei.radar.mob:
                                description: Allow the player to use Rei's Minimap mob radar
                            aclight.mods.rei.radar.slime:
                                description: Allow the player to use Rei's Minimap slime radar
                            aclight.mods.rei.radar.squid:
                                description: Allow the player to use Rei's Minimap squid radar
                            aclight.mods.rei.radar.other:
                                description: Allow the player to use Rei's Minimap other radar
            aclight.mods.smartmoving:
                description: Allow the player to use the Smart Moving mod.
                children:
                    aclight.mods.smartmoving.climbing:
                        description: Allow the player to use Smart Moving's climbing movement.
                    aclight.mods.smartmoving.crawling:
                        description: Allow the player to use Smart Moving's crawling movement.
                    aclight.mods.smartmoving.flying:
                        description: Allow the player to use Smart Moving's flying movement.
                    aclight.mods.smartmoving.jumping:
                        description: Allow the player to use Smart Moving's jumping movement.
                    aclight.mods.smartmoving.sliding:
                        description: Allow the player to use Smart Moving's sliding movement.
                    aclight.mods.smartmoving.swimming:
                        description: Allow the player to use Smart Moving's swimming movement.
            aclight.mods.zombe:
                description: Allow the player to use the Zombe mod.
                children:                        
                    aclight.mods.zombe.cheat:
                        description: Allow the player to use Zombe's cheat.
                    aclight.mods.zombe.fly:
                        description: Allow the player to use Zombe's fly mod.
                    aclight.mods.zombe.noclip:
                        description: Allow the player to use Zombe's noclip.
    
    aclight.notify:
        description: Receive notifications about violations in-game.
    
    aclight.filter.command:
        description: Allows use of all commands protected by the command protection, like the ncp root command. Does not give functionality but allow seeing usage and tab-completion of the command. In future there can be many children not listed in this config.
        children:
            aclight.filter.command.aclight:
                description: Filter permission to allow using sub commands of the /aclight command. This permission should not be necessary to ever be given to any player unless the permission plugin is incompatible with certain aspects of super-perms.
    
    # Command permissions:
    aclight.command:
        description: "All command permissions, do not give lightly - if in doubt use shortcut permissions for moderators (aclight.shortcut.monitor|safeadmin ...)."
        children:
            aclight.filter.command.aclight: true
            aclight.command.notify:
                description: Allow toggling notifications.
                children:
                    aclight.notify: true
            aclight.filter.command.aclight: true
            aclight.command.reload:
                description: Allow the player to reload aclight configuration.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.top:
                description: Allow to search violation history for top violations.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.info:
                description: Allow to see violation info about a player.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.inspect:
                description: Allow to see detailed information about online players.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.exemptions:
                description: Allow to see exemptions for a player.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.exempt:
                description: Allow to add exemptions for a player.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.unexempt:
                description: Allow to remove exemptions from  a player.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.ban:
                description: Allow use of the ncp ban command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.kick:
                description: Allow use of the ncp kick command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.denylist:
                description: Allow use of the ncp denylist command (view players who are denied to login right now).
                children:
                    aclight.filter.command.aclight: true
            aclight.command.lag:
                description: Allow use of the ncp lag command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.tell:
                description: Allow use of the ncp tell command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.delay:
                description: Allow use of the ncp delay command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.denylogin:
                description: Allow use of the ncp denylogin command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.allowlogin:
                description: Allow use of the ncp allowlogin command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.version:
                description: Allow use of the ncp version command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.removeplayer:
                description: Allow use of the ncp removeplayer command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.commands:
                description: Allow use of the ncp commands command.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.log:
                description: Show various stats/debugging information. [Incomplete, experimental.]
                children:
                    aclight.filter.command.aclight: true
            aclight.command.reset:
                description: Reset statistics or debugging counters.
                children:
                    aclight.filter.command.aclight: true
            aclight.command.debug:
                description: Start logging debug information for a player (lots of output, log file).
                children:
                    aclight.filter.command.aclight: true
            aclight.command.stopwatch:
                description: Stop watch functionality. See tab-completion and feedback.
                children:
                    aclight.filter.command.aclight: true
    
    # Bypass permissions (other than checks):
    aclight.bypass:
        description: Bypass other features than checks.
        children:
            aclight.bypass.denylogin:
                description: Bypass the login denial, such as exists with the ncp denylogin command.
    
    # Various shortcuts:
    aclight.shortcut:
        description: 'Shortcut permissions designed to be somewhat "safe" to give (see children permissions).'
        children:
            aclight.shortcut.info:
                description: Info commands about players.
                children:
                    aclight.command.notify: true
                    aclight.command.top: true
                    aclight.command.info: true
                    aclight.command.exemptions: true
                    aclight.command.denylist: true
                    aclight.command.commands: true
                    aclight.command.stopwatch: true
                    # TODO: Put lag here ?
            aclight.shortcut.monitor:
                description: All monitoring commands such as player and system info (including plugins).
                children:
                    aclight.shortcut.info: true
                    aclight.command.version: true
                    aclight.command.lag: true
                    # TODO: All commands !?
                    aclight.filter.command: true
                    # TODO: inspect ?
            aclight.shortcut.safeadmin:
                description: 'Permissions for "safe" administration, excluding rather critical operations like reload and action commands like ban/delay (arbitrary console commands!). Fit for "heavy" mods, include temp-kicking and exemptions, does bypass login-denial.'
                children:
                    aclight.shortcut.monitor: true
                    aclight.command.allowlogin: true
                    aclight.command.exempt: true
                    aclight.command.unexempt: true
                    aclight.command.removeplayer: true
                    aclight.filter.command: true
                    aclight.bypass.denylogin: true
                    # TODO: inspect ?
            aclight.shortcut.bypass:
                description: Bypass everything that can be bypassed.
                children:
                    aclight.bypass: true
                    aclight.filter.command: true
                    aclight.shortcut.cheater:
                        description: Allow use of all cheating, excludes bypassing temp-kick and command protection and similar.
                        children:
                            aclight.checks: true
                            aclight.mods: true
              
    # Shortcut: convenient testing.
    aclight.tester:
        description: Monitoring and debugging permissions, including removing data and exemption handling for oneself.
        children:
            # TODO: Might just inherit from shortcut.info.
            aclight.shortcut.monitor: true
            aclight.admin.debug: true
            aclight.command.exempt.self: true
            aclight.command.unexempt.self: true
            aclight.command.removeplayer.self: true
    
    # Shortcut: full administrator without check-bypass-permissions:
    aclight.admin:
        description: "Give the player all administration rights (does not exclude from checks), do not give lightly - if in doubt use shortcut permissions for moderators (aclight.shortcut.monitor|safeadmin ...)."
        children:
            # TODO: move debug permission (debug.XYZ?).
            aclight.admin.debug:
                description: Receive debugging information (or cause console logs on other occasions).
            
            aclight.bypass.denylogin: true
            aclight.filter.command: true
            aclight.command: true
    
    # OP thing
    aclight:
        description: Allow the player to bypass all checks and give him all administration permissions.
        children:
            aclight.admin: true
            aclight.shortcut.bypass: true