aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/commands/PingCommand.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/commands/PingCommand.kt23
1 files changed, 23 insertions, 0 deletions
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<String>) {
+ PingOverlay.sendPing(true)
+ }
+} \ No newline at end of file