Updated particle and sound utils
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user