Implemented sound when equipping armor (#6303)

This commit is contained in:
ipad54
2024-03-25 17:15:54 +03:00
committed by GitHub
parent 337e462c8f
commit f799cfaba6
10 changed files with 286 additions and 8 deletions

View File

@@ -23,10 +23,13 @@ declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\world\sound\Sound;
class ArmorMaterial{
public function __construct(
private readonly int $enchantability
private readonly int $enchantability,
private readonly ?Sound $equipSound = null
){
}
@@ -39,4 +42,11 @@ class ArmorMaterial{
public function getEnchantability() : int{
return $this->enchantability;
}
/**
* Returns the sound that plays when equipping the armor
*/
public function getEquipSound() : ?Sound{
return $this->equipSound;
}
}