PostPlaySoundEvent
PostPlaySoundEvent
Class Attributes
Attribute
Type
Description
Listening to the Event
import ir.taher7.melodymine.api.events.PostPlaySoundEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class SoundEventListener implements Listener {
@EventHandler
public void onPostPlaySound(PostPlaySoundEvent event) {
// Get the sound name
String soundName = event.getSoundName();
// Get the socket ID
String socketID = event.getSocketID();
// Log the information
Bukkit.getLogger().info("Sound " + soundName + " was played by player with socket ID " + socketID);
}
}Last updated