Skip to content

Commit

Permalink
Add sound builder methods to Notice with String parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Feb 4, 2024
1 parent 9c006b8 commit 44696d5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ public Builder sound(Sound.Type sound, Sound.Source category, float pitch, float
return this.withPart(new NoticePart<>(NoticeType.SOUND, new Music(sound, category, pitch, volume)));
}

public Builder sound(@KeyPattern String sound, Sound.Source category, float pitch, float volume) {
return this.withPart(new NoticePart<>(NoticeType.SOUND, new Music(() -> Key.key(sound), category, pitch, volume)));
}

public Builder sound(@KeyPattern String sound, float pitch, float volume) {
return this.withPart(new NoticePart<>(NoticeType.SOUND, new Music(() -> Key.key(sound), null, pitch, volume)));
}

}

}

0 comments on commit 44696d5

Please sign in to comment.