Skip to content

Commit 48ff27f

Browse files
committed
Fixed SongStoppedEvent not fired when fade not used.
1 parent 2e76dd8 commit 48ff27f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.xxmicloxx</groupId>
77
<artifactId>NoteBlockAPI</artifactId>
8-
<version>1.6.0-SNAPSHOT</version>
8+
<version>1.6.1-SNAPSHOT</version>
99
<name>NoteBlockAPI</name>
1010

1111
<properties>

src/main/java/com/xxmicloxx/NoteBlockAPI/songplayer/SongPlayer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,10 @@ public void setPlaying(boolean playing, Fade fade) {
638638
fading = true;
639639
} else {
640640
fading = false;
641+
fadeTemp = null;
641642
volume = fadeIn.getFadeTarget();
643+
SongStoppedEvent event = new SongStoppedEvent(this);
644+
plugin.doSync(() -> Bukkit.getPluginManager().callEvent(event));
642645
}
643646

644647
CallUpdate("playing", playing);

0 commit comments

Comments
 (0)