Improve break sound retrieval

This commit is contained in:
ThisTestUser
2024-09-21 20:58:30 -04:00
parent 9ac2491cd3
commit a6adcd0926
3 changed files with 1 additions and 25 deletions

View File

@@ -1,6 +1,5 @@
package net.nuggetmc.tplus.api;
import org.bukkit.Sound;
import org.bukkit.block.Block;
/**
@@ -8,6 +7,4 @@ import org.bukkit.block.Block;
*/
public interface InternalBridge {
void sendBlockDestructionPacket(short entityId, Block block, int progress);
Sound breakBlockSound(Block block);
}

View File

@@ -1,6 +1,5 @@
package net.nuggetmc.tplus.api.agent.legacyagent;
import net.nuggetmc.tplus.api.TerminatorPlusAPI;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.block.Block;
@@ -32,6 +31,6 @@ public class LegacyUtils {
}
public static Sound breakBlockSound(Block block) {
return TerminatorPlusAPI.getInternalBridge().breakBlockSound(block);
return block.getBlockData().getSoundGroup().getBreakSound();
}
}