Skip to content

Commit 65254b9

Browse files
committed
fix(bukkit): change health check channel name from healthcheck to hc to keep 1.8 plugin message api happy
1 parent 121a874 commit 65254b9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/command/SayanVanishCommand.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import org.sayandev.stickynote.bukkit.command.BukkitCommand
4040
import org.sayandev.stickynote.bukkit.command.BukkitSender
4141
import org.sayandev.stickynote.bukkit.command.required
4242
import org.sayandev.sayanvanish.bukkit.utils.PlayerUtils.sendComponent
43+
import org.sayandev.stickynote.bukkit.utils.ServerVersion
4344
import org.sayandev.stickynote.core.utils.MilliCounter
4445
import java.io.File
4546
import java.util.concurrent.CompletableFuture
@@ -434,6 +435,9 @@ class SayanVanishCommand : BukkitCommand(settings.command.name, *settings.comman
434435
handler { context ->
435436
val sender = context.sender().platformSender()
436437
launch {
438+
if (!ServerVersion.supports(9)) {
439+
sender.sendComponent("<red>This feature might not work as expected in your server version!")
440+
}
437441
HealthCache.sendHealthReport(sender)
438442
}
439443
}

sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/health/HealthCheckRequestPublisher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.sayandev.stickynote.bukkit.plugin
66

77
object HealthCheckRequestPublisher : ProxyPluginMessagePublisher<Unit, HealthCheckData>(
88
plugin.name.lowercase(),
9-
"healthcheck",
9+
"hc",
1010
Unit::class.java,
1111
HealthCheckData::class.java
1212
)

sayanvanish-proxy/sayanvanish-proxy-velocity/src/main/kotlin/org/sayandev/sayanvanish/velocity/health/HealthCheckMessageSubscriber.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.sayandev.stickynote.velocity.plugin
1212

1313
class HealthCheckMessageSubscriber: ProxySubscriber<Unit, HealthCheckData>(
1414
plugin.container.description.name.get().lowercase(),
15-
"healthcheck",
15+
"hc",
1616
Unit::class.java
1717
) {
1818

0 commit comments

Comments
 (0)