Removed startup sound, closes #4

This commit is contained in:
Stijn Bannink 2022-12-29 11:17:29 +01:00 committed by GitHub
parent 8608c194d5
commit 7172c575ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ public class Client {
List<String> regions = WGManager.getRegionsIn(p.getLocation()).stream().map(ProtectedRegion::getId).collect(Collectors.toList());
Set<String> list = MCTPAudio.getPlugin().getConfig().getConfigurationSection("Regions").getKeys(false);
Optional<String> regionName = regions.stream().filter(list::contains).findFirst();
regionName.ifPresentOrElse(name -> {
regionName.ifPresent(name -> {
String regionURL = MCTPAudio.getPlugin().getConfig().getString("Regions." + name);
JSONObject data = new JSONObject();
@ -111,14 +111,6 @@ public class Client {
data.put("path", regionURL);
data.put("uuid", p.getUniqueId().toString().replace("-", ""));
MCTPAudio.getClient().sendData(data);
}, () -> {
if (!event.isCancelled()) return;
JSONObject data = new JSONObject();
data.put("task", "SFX");
data.put("path", "http://audio.mcthemeparks.eu/assets/music/oaintro.mp3");
data.put("uuid", p.getUniqueId().toString().replace("-", ""));
MCTPAudio.getClient().sendData(data);
});
}