Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CompoundSound. #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commons-bukkit/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
<artifactId>commons-bukkit</artifactId>

<properties>
<spigot.version>1.19.2-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.19.3-R0.1-SNAPSHOT</spigot.version>
<squirrelid-version>0.1.0</squirrelid-version>
<text.version>1.12-1.6.5</text.version>
<acf-bukkit.version>0.5.0-SNAPSHOT</acf-bukkit.version>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.supaham.commons.bukkit;

import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;

public class CompoundSound extends Sound {
private final SingleSound[] singleSounds;

/**
* Constructs a compound sound with a List of SingleSound objects.
*
* @param singleSounds sounds to play
* @see SingleSound
*/
public CompoundSound(@Nonnull SingleSound[] singleSounds) {
this.singleSounds = singleSounds;
}


@Override
public void play(@NotNull Player player, @NotNull Location location) {
for (SingleSound singleSound : singleSounds) {
singleSound.play(player, location);
}
}
}
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

import net.minecraft.network.protocol.Packet;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
2 changes: 1 addition & 1 deletion commons-minecraft/pom.xml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
<name>Commons-Minecraft</name>

<properties>
<acf-core.version>0.5.0-SNAPSHOT</acf-core.version>
<acf-core.version>0.5.1-SNAPSHOT</acf-core.version>
</properties>

<repositories>