# project data for Bukkit in order to register our plugin with all it components
# ${-} are variables from Maven (pom.xml) which will be replaced after the build
name: LagMonitor
version: 1.17
main: com.github.games647.lagmonitor.LagMonitor

# meta data for plugin managers
authors: [games647, 'https://github.com/games647/LagMonitor/graphs/contributors']
description: |
    Monitors your Minecraft server for Lags
website: https://dev.bukkit.org/bukkit-plugins/LagMonitor/
dev-url: https://dev.bukkit.org/bukkit-plugins/LagMonitor/

softdepend: [PacketListenerApi]

commands:
    lagmonitor:
        description: 'Gets displays the help page of all lagmonitor commands'
        permission: lagmonitor.command.help
    ping:
        description: 'Gets the ping of the selected player'
        usage: '/<command> [player]'
        permission: lagmonitor.command.ping
    stacktrace:
        description: 'Gets the execution stacktrace of selected thread'
        usage: '/<command> [threadName]'
        permission: lagmonitor.command.stacktrace
    thread:
        description: 'Outputs all running threads with their current state'
        usage: '/<command> [dump]'
        aliases: [threads]
        permission: lagmonitor.command.thread
    tpshistory:
        description: 'Outputs the current tps'
        aliases: [tps, lag]
        permission: lagmonitor.command.tps
    mbean:
        description: 'Outputs mbeans attributes (java environment information)'
        aliases: [bean]
        usage: '/<command> [beanName] [attribute]'
        permission: lagmonitor.command.mbean
    system:
        description: 'Gives you some general information (Minecraft server related)'
        permission: lagmonitor.command.system
    timing:
        description: 'Outputs your server timings ingame'
        permission: lagmonitor.command.timing
    monitor:
        description: 'Monitors the CPU usage of methods'
        permission: lagmonitor.command.monitor
        usage: '/<command> [start/stop]'
        aliases: [profile, profiler, prof]
    graph:
        description: 'Gives you visual graph about your server'
        usage: '/<command> [heap/cpu/threads/classes]'
        permission: lagmonitor.command.graph
    environment:
        description: 'Gives you some general information (OS related)'
        permission: lagmonitor.command.environment
        aliases: [env]
    native:
        description: 'Gives you information about your Hardware'
        permission: lagmonitor.command.native
    vm:
        description: 'Gives you information about your Hardware'
        aliases: [virtualmachine, machine, virtual]
        permission: lagmonitor.command.vm
    network:
        description: 'Gives you information about your Network configuration'
        aliases: [net]
        permission: lagmonitor.command.network
    tasks:
        description: 'Information about running and pending tasks'
        aliases: [task]
        permission: lagmonitor.command.tasks
    heap:
        description: 'Heap dump about your current memory'
        aliases: [ram, memory]
        usage: /<command> [dump]
        permission: lagmonitor.command.heap
    lagpage:
        description: 'Pages command for the current pagination session'
        usage: '/<command> <next/prev/number>'
    jfr:
        description: |
            'Manages the Java Flight Recordings of the native Java VM. It gives you much more detailed information
            including network communications, file read/write times, detailed heap and thread data, ...'
        aliases: [flightrecoder]
        usage: '/<command> <start/stop/dump>'
        permission: lagmonitor.command.jfr

permissions:
    lagmonitor.*:
        description: Gives access to all LagMonitor Features
        children:
            lagmonitor.commands.*: true

    lagmonitor.commands.*:
        description: Gives access to all LagMonitor commands
        children:
            lagmonitor.command.ping: true
            lagmonitor.command.ping.other: true
            lagmonitor.command.stacktrace: true
            lagmonitor.command.thread: true
            lagmonitor.command.tps: true
            lagmonitor.command.mbean: true
            lagmonitor.command.system: true
            lagmonitor.command.timing: true
            lagmonitor.command.monitor: true
            lagmonitor.command.graph: true
            lagmonitor.command.native: true
            lagmonitor.command.vm: true
            lagmonitor.command.network: true
            lagmonitor.command.tasks: true
            lagmonitor.command.jfr: true

    lagmonitor.command.ping.other:
        description: 'Get the ping from other players'
        children:
            lagmonitor.command.ping: true
