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

@@ -65,7 +65,7 @@ data class KSpigotParticle(
* Accesses the particle builder.
* @see KSpigotParticle
*/
fun particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
fun particle(particle: Particle, builder: KSpigotParticle.() -> Unit)
= KSpigotParticle(particle).apply(builder)
/**
@@ -73,7 +73,7 @@ fun particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
* spawns the particle at the given location.
* @see KSpigotParticle
*/
fun Location.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
fun Location.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)? = null)
= KSpigotParticle(particle).apply(builder).spawnAt(this)
/**
@@ -81,5 +81,5 @@ fun Location.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?
* spawns the particle for the player.
* @see KSpigotParticle
*/
fun Player.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
fun Player.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)? = null)
= KSpigotParticle(particle).apply(builder).spawnFor(this)

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)