package dev.crucifixbeta.api.events.impl;

import dev.crucifixbeta.api.events.Event;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.sound.SoundInstance;

@Environment(EnvType.CLIENT)
public class PlaySoundEvent extends Event {
   private static final PlaySoundEvent INSTANCE = new PlaySoundEvent();
   public SoundInstance sound;

   public static PlaySoundEvent get(SoundInstance sound) {
      INSTANCE.setCancelled(false);
      INSTANCE.sound = sound;
      return INSTANCE;
   }
}
