diff --git a/src/main/java/com/ilm9001/nightclub/beatmap/BeatmapPlayer.java b/src/main/java/com/ilm9001/nightclub/beatmap/BeatmapPlayer.java index 6e455ae..a5b20cb 100644 --- a/src/main/java/com/ilm9001/nightclub/beatmap/BeatmapPlayer.java +++ b/src/main/java/com/ilm9001/nightclub/beatmap/BeatmapPlayer.java @@ -73,11 +73,11 @@ public InfoData play(List playTo) { public void stop() { List channelList = Arrays.asList(LightChannel.values()); if (executorService != null) { - executorService.schedule(() -> channelList.forEach(channel -> { + channelList.forEach(channel -> { channel.getHandler().off(new Color(0x000000)); channel.getHandler().stop(); isPlaying = false; - }), 0, TimeUnit.MILLISECONDS); + }); executorService.shutdownNow(); } playTo.forEach(player -> player.stopSound(name)); diff --git a/src/main/java/com/ilm9001/nightclub/commands/LightCommand.java b/src/main/java/com/ilm9001/nightclub/commands/LightCommand.java index 632fff0..5c148f1 100644 --- a/src/main/java/com/ilm9001/nightclub/commands/LightCommand.java +++ b/src/main/java/com/ilm9001/nightclub/commands/LightCommand.java @@ -37,10 +37,6 @@ public static void onBuild(Player player, String[] args) { if (manager.getLoadedUniverse() == null) { return; } - if (light != null) { - light.off(new Color(0x000000)); - light.stop(); - } light = new Light(UUID.randomUUID(), "Unnamed-Light" + new Random().nextInt(), Location.getFromBukkitLocation(player.getLocation().add(0, 1, 0)), 15, 80, 0.3, 5, 45, 3, player.getLocation().getPitch() > -10, LightPattern.CIRCLE, LightType.GUARDIAN_BEAM, LightChannel.CENTER_LIGHTS, LightSpeedChannel.DEFAULT);