aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/commands/PingCommand.kt
diff options
context:
space:
mode:
authorAppability <appable@icloud.com>2022-10-23 12:00:05 -0700
committerAppability <appable@icloud.com>2022-10-23 12:00:05 -0700
commit0576a7f5304565bb58a499b8ccdcda31ed587dc4 (patch)
tree766fad4c88ec8be5b142e338f097b67aa7322234 /src/main/kotlin/com/ambientaddons/commands/PingCommand.kt
parent4f25e7948c7e85151a80c17f7d2b25b72675cecf (diff)
downloadAmbientAddons-0576a7f5304565bb58a499b8ccdcda31ed587dc4.tar.gz
AmbientAddons-0576a7f5304565bb58a499b8ccdcda31ed587dc4.tar.bz2
AmbientAddons-0576a7f5304565bb58a499b8ccdcda31ed587dc4.zip
ping command and display
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