All Downloads are FREE. Search and download functionalities are using the official Maven repository.

walkmc.event.SoundEvent.kt Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package walkmc.event

import org.bukkit.*
import org.bukkit.entity.*
import walkmc.*

/**
 * Called when a sound is played.
 */
open class SoundEvent(var sound: Sound?, var volume: Float, var pitch: Float) : CancellableEvent()

/**
 * Called when a entity makes any type of sound.
 */
class EntitySoundEvent(
   val entity: Entity,
   sound: Sound?,
   volume: Float,
   pitch: Float,
) : SoundEvent(sound, volume, pitch) {
   val world: World get() = entity.world
   val location: Location get() = entity.location
   val type: EntityType get() = entity.type
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy