aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt
blob: a3d68cbf7978fbe30de8c22862bc4bc53b4d5619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.ambientaddons.commands

import com.ambientaddons.config.Config
import com.ambientaddons.features.display.PingOverlay
import com.ambientaddons.utils.Extensions.withModPrefix
import com.ambientaddons.utils.SBLocation
import gg.essential.universal.UChat
import net.minecraft.command.CommandBase
import net.minecraft.command.ICommandSender

class PingCommand : CommandBase() {
    override fun getCommandName() = "ping"

    override fun getCommandAliases() = listOf("amping")

    override fun getCommandUsage(sender: ICommandSender?) = "/$commandName"

    override fun getRequiredPermissionLevel() = 0

    override fun processCommand(sender: ICommandSender?, args: Array<String>) {
        PingOverlay.sendPing(true)
    }
}