diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt index 69c16daeb..a48294bd8 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.OSUtils @@ -35,7 +36,13 @@ object TrackParticlesCommand { private var display: List<Renderable> = emptyList() private var worldParticles: Map<LorenzVec, List<ReceiveParticleEvent>> = emptyMap() + // TODO write abstract code for this and TrackSoundsCommand fun command(args: Array<String>) { + if (!LorenzUtils.inSkyBlock) { + ChatUtils.userError("This command only works in SkyBlock!") + return + } + if (args.firstOrNull() == "end") { if (!isRecording) { ChatUtils.userError("Nothing to end") diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt index 1fadab62d..18cfcf786 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.OSUtils @@ -36,7 +37,13 @@ object TrackSoundsCommand { private var display: List<Renderable> = emptyList() private var worldSounds: Map<LorenzVec, List<PlaySoundEvent>> = emptyMap() + // TODO write abstract code for this and TrackParticlesCommand fun command(args: Array<String>) { + if (!LorenzUtils.inSkyBlock) { + ChatUtils.userError("This command only works in SkyBlock!") + return + } + if (args.firstOrNull() == "end") { if (!isRecording) { ChatUtils.userError("Nothing to end") |