Applied kotlin style conventions

This commit is contained in:
bluefireoly
2020-10-18 18:36:49 +02:00
parent e1d4e8bbfc
commit da848728d2
39 changed files with 509 additions and 385 deletions

View File

@@ -44,21 +44,20 @@ data class KSpigotSound(
* Accesses the sound builder.
* @see KSpigotSound
*/
fun sound(sound: Sound, builder: KSpigotSound.() -> Unit)
= KSpigotSound(sound).apply(builder)
fun sound(sound: Sound, builder: KSpigotSound.() -> Unit) = KSpigotSound(sound).apply(builder)
/**
* Accesses the sound builder and then immediately
* plays the sound at the given location.
* @see KSpigotSound
*/
fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null)
= KSpigotSound(sound).applyIfNotNull(builder).playAt(this)
fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null) =
KSpigotSound(sound).applyIfNotNull(builder).playAt(this)
/**
* Accesses the sound builder and then immediately
* plays the sound for the player.
* @see KSpigotSound
*/
fun Player.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null)
= KSpigotSound(sound).applyIfNotNull(builder).playFor(this)
fun Player.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)? = null) =
KSpigotSound(sound).applyIfNotNull(builder).playFor(this)