KillDeathSound

When the player is killed and dies, the sound will work

KillDeathSound | v3.0.4



✔️ When the player is killed and dies, the sound will work ✔️

✔️ Can be set to work or not ✔️
✔️ added sound when hitting or archery hits the enemy ✔️
✔️ Can access to KillDeathSound ✔️
✔️ Generates blood particles when killed, killed, punched, and hit by archery ✔️
✔️ It is possible for all entities to bleed when punching, arching, killing, dying ✔️
✔️ Customizable Add Blood Particle to attacker ✔️

Update

UpdateState
Can be set to work or not✔️
added sound when hitting or archery hits the enemy✔️
Can access to KillDeathSound✔️
Generates blood particles when killed, killed, punched, and hit by archery✔️
It is possible for all entities to bleed when punching, arching, killing, dying✔️
Customizable Add Blood Particle to attacker✔️
add function addBlood() and addBloodAt() for Developer✔️
Update config version✔️
Update to PocketMine-MP 5.0.0✔️

Features

  • When the player is killed and dies, the sound will work
  • Generates blood particles when killed, killed, punched, and hit by archery
  • added sound when hitting or archery hits the enemy

Config

---
# config.yml
#    
#    ██╗░░██╗██╗██╗░░░░░██╗░░░░░██████╗░███████╗░█████╗░████████╗██╗░░██╗░██████╗░█████╗░██╗░░░██╗███╗░░██╗██████╗░
#    ██║░██╔╝██║██║░░░░░██║░░░░░██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██║░░██║██╔════╝██╔══██╗██║░░░██║████╗░██║██╔══██╗
#    █████═╝░██║██║░░░░░██║░░░░░██║░░██║█████╗░░███████║░░░██║░░░███████║╚█████╗░██║░░██║██║░░░██║██╔██╗██║██║░░██║
#    ██╔═██╗░██║██║░░░░░██║░░░░░██║░░██║██╔══╝░░██╔══██║░░░██║░░░██╔══██║░╚═══██╗██║░░██║██║░░░██║██║╚████║██║░░██║
#    ██║░╚██╗██║███████╗███████╗██████╔╝███████╗██║░░██║░░░██║░░░██║░░██║██████╔╝╚█████╔╝╚██████╔╝██║░╚███║██████╔╝
#    ╚═╝░░╚═╝╚═╝╚══════╝╚══════╝╚═════╝░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═════╝░░╚════╝░░╚═════╝░╚═╝░░╚══╝╚═════╝░
#
# You can see the list of sound effects at this link: "https://www.digminecraft.com/lists/sound_list_pe.php"
# Don't Change It!
config-version: 3.0.3
# Player Death
death:
  addsound: true
  blood: true
  blood-all-entity: true # Add Blood Particle to all entity hit, arching
  sound: # Sound name
  - "random.explode"
  volume: 1 # Volume sounds
  pitch: 1 # Pitch sounds

# Player Kills
kill:
  addsound: true
  blood: true
  blood-all-entity: true # Add Blood Particle to all entity hit, arching
  sound: # Sound name
  - "random.levelup"
  - "random.totem"
  volume: 1 # Volume sounds
  pitch: 1 # Pitch sound
  
# Player Hit & Archery
hit:
  addsound: true
  blood: true
  blood-all-entity: true # Add Blood Particle to all entity hit, arching
  blood-to-attacker: false # Add Blood Particle to attacker
  sound: # Sound name
  - "random.orb"
  volume: 1 # Volume sounds
  pitch: 1 # Pitch sounds
...

For Developer

  • You can access to KillDeathSound by using KillDeathSound::getInstance()
  • Add sound usage:
$player = $event->getPlayer();
$soundName = "random.explode";
$volume = 1;
$pitch = 1;
KillDeathSound::getInstance()->playSound($player, $soundName, $volume, $pitch);
  • Add Blood Particle usage:
$position = $event->getPlayer()->getPosition();
KillDeathSound::getInstance()->addBlood($position);

// or

$x = $event->getPlayer()->getPosition()->getX();
$y = $event->getPlayer()->getPosition()->getY();
$z = $event->getPlayer()->getPosition()->getZ();
$world = $event->getPlayer()->getPosition()->getWorld();
KillDeathSound::getInstance()->addBloodAt($x, $y, $z, $world);

Install

  • Step 1: Click the Direct Download button to download the plugin
  • Step 2: move the file KillDeathSound.phar into the file plugins
  • Step 3: Restart server for plugins to work

Details

Version: 3.0.4

Downloads: 1,211

Updated: 7/15/2023

Supported API versions: 5.0.0 to 5.27.1

Categories: General, API plugins, Developer Tools

License: GPL-3.0

Producers

Collaborator