forked from SteamWar/SteamWar
Fix TNTLeague Sound
This commit is contained in:
@@ -35,11 +35,10 @@ import de.steamwar.tntleague.inventory.DealerInventory
|
|||||||
import de.steamwar.tntleague.message
|
import de.steamwar.tntleague.message
|
||||||
import de.steamwar.tntleague.plugin
|
import de.steamwar.tntleague.plugin
|
||||||
import de.steamwar.tntleague.util.*
|
import de.steamwar.tntleague.util.*
|
||||||
import net.kyori.adventure.bossbar.BossBar
|
|
||||||
import net.kyori.adventure.sound.Sound
|
|
||||||
import org.bukkit.GameMode
|
import org.bukkit.GameMode
|
||||||
import org.bukkit.Location
|
import org.bukkit.Location
|
||||||
import org.bukkit.Material
|
import org.bukkit.Material
|
||||||
|
import org.bukkit.Sound
|
||||||
import org.bukkit.entity.Item
|
import org.bukkit.entity.Item
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.entity.TNTPrimed
|
import org.bukkit.entity.TNTPrimed
|
||||||
@@ -107,7 +106,7 @@ object TNTLeagueGame {
|
|||||||
|
|
||||||
if (gameTimeRemaining % 300 == 0) {
|
if (gameTimeRemaining % 300 == 0) {
|
||||||
message.broadcast("TIME_REMAINING", (gameTimeRemaining / 60))
|
message.broadcast("TIME_REMAINING", (gameTimeRemaining / 60))
|
||||||
plugin.server.onlinePlayers.forEach { it.playSound(Sound.sound(org.bukkit.Sound.BLOCK_NOTE_BLOCK_PLING.key, Sound.Source.MASTER, 1f, 1f)) }
|
plugin.server.onlinePlayers.forEach { it.playSound(it.location, Sound.BLOCK_NOTE_BLOCK_PLING, 1f, 1f) }
|
||||||
}
|
}
|
||||||
}, 20, 20)
|
}, 20, 20)
|
||||||
}
|
}
|
||||||
@@ -121,7 +120,7 @@ object TNTLeagueGame {
|
|||||||
plugin.server.onlinePlayers.forEach {
|
plugin.server.onlinePlayers.forEach {
|
||||||
it.gameMode = GameMode.SPECTATOR
|
it.gameMode = GameMode.SPECTATOR
|
||||||
SWScoreboard.impl.removeScoreboard(it)
|
SWScoreboard.impl.removeScoreboard(it)
|
||||||
it.playSound(Sound.sound(org.bukkit.Sound.ENTITY_ENDER_DRAGON_DEATH.key, Sound.Source.MASTER, 1f, 1f))
|
it.playSound(it.location, Sound.ENTITY_ENDER_DRAGON_DEATH, 1f, 1f)
|
||||||
}
|
}
|
||||||
|
|
||||||
message.broadcast("GAME_ENDED")
|
message.broadcast("GAME_ENDED")
|
||||||
@@ -156,7 +155,7 @@ object TNTLeagueGame {
|
|||||||
var countdown = TNTLeagueConfig.config.startDelay
|
var countdown = TNTLeagueConfig.config.startDelay
|
||||||
message.broadcast("GAME_STARTING", countdown.toString())
|
message.broadcast("GAME_STARTING", countdown.toString())
|
||||||
task = plugin.server.scheduler.scheduleSyncRepeatingTask(plugin, {
|
task = plugin.server.scheduler.scheduleSyncRepeatingTask(plugin, {
|
||||||
plugin.server.onlinePlayers.forEach { it.playSound(Sound.sound(org.bukkit.Sound.ENTITY_EXPERIENCE_ORB_PICKUP.key, Sound.Source.MASTER, 1f, 1f)) }
|
plugin.server.onlinePlayers.forEach { it.playSound(it.location, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1f) }
|
||||||
if (--countdown == 0) {
|
if (--countdown == 0) {
|
||||||
plugin.server.onlinePlayers.forEach { it.level = 0 }
|
plugin.server.onlinePlayers.forEach { it.level = 0 }
|
||||||
task = task?.also { plugin.server.scheduler.cancelTask(it) }.let { null }
|
task = task?.also { plugin.server.scheduler.cancelTask(it) }.let { null }
|
||||||
|
|||||||
Reference in New Issue
Block a user