mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fix for unwanted audio panning (#3430)
* Fixes https://github.com/IntellectualSites/PlotSquared/issues/3422 * Removed old code Co-authored-by: Alex <mc.cache@web.de>
This commit is contained in:
parent
8f7c2e4c02
commit
6fc4005c72
@ -281,7 +281,7 @@ public class PlotListener {
|
|||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
Location lastLocation = musicMeta.get().orElse(null);
|
Location lastLocation = musicMeta.get().orElse(null);
|
||||||
if (lastLocation != null) {
|
if (lastLocation != null) {
|
||||||
player.playMusic(lastLocation, musicFlag);
|
plot.getCenter(center -> player.playMusic(center.add(0, Short.MAX_VALUE, 0), musicFlag));
|
||||||
if (musicFlag == ItemTypes.AIR) {
|
if (musicFlag == ItemTypes.AIR) {
|
||||||
musicMeta.remove();
|
musicMeta.remove();
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ public class PlotListener {
|
|||||||
if (musicFlag != ItemTypes.AIR) {
|
if (musicFlag != ItemTypes.AIR) {
|
||||||
try {
|
try {
|
||||||
musicMeta.set(location);
|
musicMeta.set(location);
|
||||||
player.playMusic(location, musicFlag);
|
plot.getCenter(center -> player.playMusic(center.add(0, Short.MAX_VALUE, 0), musicFlag));
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user