Updated particle and sound utils
This commit is contained in:
@@ -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)
|
@@ -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