Updated particle and sound utils

This commit is contained in:
bluefireoly
2020-10-11 18:21:00 +02:00
parent 88cd619175
commit 39620b6f55
2 changed files with 6 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ data class KSpigotSound(
* Accesses the sound builder.
* @see KSpigotSound
*/
fun sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
fun sound(sound: Sound, builder: KSpigotSound.() -> Unit)
= KSpigotSound(sound).apply(builder)
/**
@@ -52,7 +52,7 @@ fun sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
* plays the sound at the given location.
* @see KSpigotSound
*/
fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null)
= KSpigotSound(sound).apply(builder).playAt(this)
/**
@@ -60,5 +60,5 @@ fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
* plays the sound for the player.
* @see KSpigotSound
*/
fun Player.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
fun Player.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null)
= KSpigotSound(sound).apply(builder).playFor(this)