Hello there! Ok I am new to developing plugins and I had an Idea which was to use BlockBreakEvent and make it have a xp sound whenever a player breaks stone, but I do not have the slightest Idea how to add it can I Please get some assistance from anyone? Thanks in Advance My Try: PHP: public function onBreak(BlockBreakEvent $event){ $player = $event->getPlayer(); $block = $event->getBlock(); if($block->getId() == 1){$player->getLevel()->addSound(new //XPSound???($player)); } }}
Yes PHP: public function onBreak(BlockBreakEvent $event){ $player = $event->getPlayer(); $block = $event->getBlock(); if($block->getId() == 1){ $player->getLevel()->addSound(new //XPSound???($player)(soundname)); } }