Skip to content

Commit bdb35e1

Browse files
authored
Merge pull request #16 from Xorgon/master
Added CompoundSound.
2 parents ea4f1c4 + 769f0b8 commit bdb35e1

File tree

15 files changed

+1419
-1408
lines changed

15 files changed

+1419
-1408
lines changed

commons-bukkit/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<parent>
66
<artifactId>commons-parent</artifactId>
77
<groupId>com.supaham.commons</groupId>
8-
<version>0.4.1-SNAPSHOT</version>
8+
<version>0.4.2-SNAPSHOT</version>
99
</parent>
1010
<version>${commons-version}</version>
1111
<modelVersion>4.0.0</modelVersion>
1212
<artifactId>commons-bukkit</artifactId>
1313

1414
<properties>
15-
<spigot.version>1.19.2-R0.1-SNAPSHOT</spigot.version>
15+
<spigot.version>1.21.10-R0.1-SNAPSHOT</spigot.version>
1616
<squirrelid-version>0.1.0</squirrelid-version>
1717
<text.version>1.12-1.6.5</text.version>
18-
<acf-bukkit.version>0.5.0-SNAPSHOT</acf-bukkit.version>
18+
<acf-bukkit.version>0.5.1-SNAPSHOT</acf-bukkit.version>
1919
</properties>
2020

2121
<repositories>
@@ -93,7 +93,7 @@
9393
<plugin>
9494
<groupId>net.md-5</groupId>
9595
<artifactId>specialsource-maven-plugin</artifactId>
96-
<version>1.2.2</version>
96+
<version>2.0.4</version>
9797
<executions>
9898
<execution>
9999
<phase>package</phase>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.supaham.commons.bukkit;
2+
3+
import org.bukkit.Location;
4+
import org.bukkit.entity.Player;
5+
import org.jetbrains.annotations.NotNull;
6+
7+
import javax.annotation.Nonnull;
8+
9+
public class CompoundSound extends Sound {
10+
private final SingleSound[] singleSounds;
11+
12+
/**
13+
* Constructs a compound sound with a List of SingleSound objects.
14+
*
15+
* @param singleSounds sounds to play
16+
* @see SingleSound
17+
*/
18+
public CompoundSound(@Nonnull SingleSound[] singleSounds) {
19+
this.singleSounds = singleSounds;
20+
}
21+
22+
23+
@Override
24+
public void play(@NotNull Player player, @NotNull Location location) {
25+
for (SingleSound singleSound : singleSounds) {
26+
singleSound.play(player, location);
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)