Fixed sound issue

This commit is contained in:
Stijn Bannink 2024-12-21 19:49:39 +01:00
parent 14efcf08c1
commit b35777739b
Signed by: SBDeveloper
GPG key ID: B730712F2C3A9D7A

View file

@ -23,7 +23,6 @@ import nl.sbdeveloper.vehiclesplus.api.vehicles.settings.impl.*;
import nl.sbdeveloper.vehiclesplus.storage.db.exceptions.DataStorageException; import nl.sbdeveloper.vehiclesplus.storage.db.exceptions.DataStorageException;
import nl.sbdeveloper.vehiclesplus.utils.jackson.ColorList; import nl.sbdeveloper.vehiclesplus.utils.jackson.ColorList;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Sound;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import tech.sbdevelopment.vehiclesplusconverter.VehiclesPlusConverter; import tech.sbdevelopment.vehiclesplusconverter.VehiclesPlusConverter;
@ -31,7 +30,6 @@ import tech.sbdevelopment.vehiclesplusconverter.api.ConversionException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.UUID; import java.util.UUID;
import static tech.sbdevelopment.vehiclesplusconverter.utils.MainUtil.*; import static tech.sbdevelopment.vehiclesplusconverter.utils.MainUtil.*;
@ -229,8 +227,7 @@ public class Converter {
.horn(new Horn( .horn(new Horn(
baseVehicle.getHornSettings().getEnabled(), baseVehicle.getHornSettings().getEnabled(),
new Sounds.Sound( new Sounds.Sound(
Optional.ofNullable(baseVehicle.getHornSettings().getSound().get()) baseVehicle.getHornSettings().getSound().name(),
.orElse(Sound.BLOCK_NOTE_BLOCK_BASS).getKey().toString(),
1 1
) )
)) ))