move jingles command to other branch

This commit is contained in:
psyopcutie 2026-07-29 11:43:09 +02:00
parent aa9e245901
commit f2e794b6c7

View file

@ -48,29 +48,6 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){
notify(player,"Now playing jingle $id")
}
define("jingles", Privilege.ADMIN, "::jingles <lt>From Jingle ID<gt> <lt>To Jingle ID<gt> <lt>(opt) Duration Per Jingle<gt>", "Plays jingles from the From ID to the To ID, with a delay of 5 between each, unless specified otherwise") { player, args ->
if (args.size < 3) {
reject(player, "Syntax error: ::jingles <From Jingle ID> <To Jingle ID> <(opt) Duration Per Jingle>")
return@define
}
val jingleFrom = args[1].toInt()
val jingleTo = args[2].toInt()
val jingleDelay = (args.getOrNull(3) ?: "5").toInt()
queueScript(player, 1, QueueStrength.WEAK) { stage: Int ->
val jingleId = jingleFrom + stage
PacketRepository.send(MusicPacket::class.java, MusicContext(player, jingleId, true))
notify(player, "Now playing jingle $jingleId")
if (jingleId == jingleTo) {
return@queueScript stopExecuting(player)
}
return@queueScript delayScript(player, jingleDelay)
}
}
/**
* Command that lets you play a song via the ID instead of the song name
* this is mostly useful for custom tracks that aren't in the ingame