Skip to content

Commit

Permalink
v2.1.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Daybreak365 committed Mar 3, 2020
1 parent 9a6c1b8 commit 35b95bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package daybreak.abilitywar.utils.library;

import com.google.common.base.Enums;
import daybreak.abilitywar.utils.base.minecraft.compat.nms.NMSHandler;
import daybreak.abilitywar.utils.base.minecraft.compat.nms.SoundsHandler;
import daybreak.abilitywar.utils.base.minecraft.version.ServerVersion;
import org.bukkit.Bukkit;
import org.bukkit.Location;
Expand Down Expand Up @@ -582,10 +582,10 @@ private SimpleSound(String latestName, String oldName) {

public void playSound(Location location, float volume, float pitch) {
if (this.sound != null) {
if (ServerVersion.getVersionNumber() >= 10) {
if (!SoundsHandler.isHandled()) {
location.getWorld().playSound(location, this.sound, volume, pitch);
} else {
NMSHandler.getNMS().playSound(sound.name(), location.getX(), location.getY(), location.getZ(), volume, pitch);
SoundsHandler.getSounds().playSound(sound.name(), location.getX(), location.getY(), location.getZ(), volume, pitch);
}
}
}
Expand All @@ -596,10 +596,10 @@ public void playSound(Location location) {

public void playSound(Player player, Location location, float volume, float pitch) {
if (this.sound != null) {
if (ServerVersion.getVersionNumber() >= 10) {
if (!SoundsHandler.isHandled()) {
player.playSound(location, this.sound, volume, pitch);
} else {
NMSHandler.getNMS().playSound(player, sound.name(), location.getX(), location.getY(), location.getZ(), volume, pitch);
SoundsHandler.getSounds().playSound(player, sound.name(), location.getX(), location.getY(), location.getZ(), volume, pitch);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<encoding>UTF-8</encoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<revision>2.1.6.6</revision>
<revision>2.1.6.7</revision>
<bukkit-api.version>1.15.2-R0.1-SNAPSHOT</bukkit-api.version>
</properties>

Expand Down

0 comments on commit 35b95bf

Please sign in to comment.