Updated particle and sound utils
This commit is contained in:
@@ -65,7 +65,7 @@ data class KSpigotParticle(
|
|||||||
* Accesses the particle builder.
|
* Accesses the particle builder.
|
||||||
* @see KSpigotParticle
|
* @see KSpigotParticle
|
||||||
*/
|
*/
|
||||||
fun particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
|
fun particle(particle: Particle, builder: KSpigotParticle.() -> Unit)
|
||||||
= KSpigotParticle(particle).apply(builder)
|
= KSpigotParticle(particle).apply(builder)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,7 +73,7 @@ fun particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?)
|
|||||||
* spawns the particle at the given location.
|
* spawns the particle at the given location.
|
||||||
* @see KSpigotParticle
|
* @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)
|
= KSpigotParticle(particle).apply(builder).spawnAt(this)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,5 +81,5 @@ fun Location.particle(particle: Particle, builder: (KSpigotParticle.() -> Unit)?
|
|||||||
* spawns the particle for the player.
|
* spawns the particle for the player.
|
||||||
* @see KSpigotParticle
|
* @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)
|
= KSpigotParticle(particle).apply(builder).spawnFor(this)
|
@@ -44,7 +44,7 @@ data class KSpigotSound(
|
|||||||
* Accesses the sound builder.
|
* Accesses the sound builder.
|
||||||
* @see KSpigotSound
|
* @see KSpigotSound
|
||||||
*/
|
*/
|
||||||
fun sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
|
fun sound(sound: Sound, builder: KSpigotSound.() -> Unit)
|
||||||
= KSpigotSound(sound).apply(builder)
|
= KSpigotSound(sound).apply(builder)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,7 +52,7 @@ fun sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
|
|||||||
* plays the sound at the given location.
|
* plays the sound at the given location.
|
||||||
* @see KSpigotSound
|
* @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)
|
= KSpigotSound(sound).apply(builder).playAt(this)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,5 +60,5 @@ fun Location.sound(sound: Sound, builder: (KSpigotSound.() -> Unit)?)
|
|||||||
* plays the sound for the player.
|
* plays the sound for the player.
|
||||||
* @see KSpigotSound
|
* @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)
|
= KSpigotSound(sound).apply(builder).playFor(this)
|
||||||
|
Reference in New Issue
Block a user