From 0576a7f5304565bb58a499b8ccdcda31ed587dc4 Mon Sep 17 00:00:00 2001 From: Appability Date: Sun, 23 Oct 2022 12:00:05 -0700 Subject: ping command and display --- .../com/ambientaddons/commands/PingCommand.kt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/kotlin/com/ambientaddons/commands/PingCommand.kt (limited to 'src/main/kotlin/com/ambientaddons/commands/PingCommand.kt') diff --git a/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt b/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt new file mode 100644 index 0000000..a3d68cb --- /dev/null +++ b/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt @@ -0,0 +1,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) { + PingOverlay.sendPing(true) + } +} \ No newline at end of file -- cgit