Skip to content

Commit 99fa504

Browse files
committed
Fixed backward compatibility for Jukebox plugin #18
1 parent 0514a20 commit 99fa504

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/main/java/com/xxmicloxx/NoteBlockAPI/utils/CompatibilityUtils.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ protected static boolean isSoundCategoryCompatible() {
7676
return true;
7777
}
7878
}
79+
80+
/**
81+
* Plays a sound using NMS & reflection
82+
* @param player
83+
* @param location
84+
* @param sound
85+
* @param category
86+
* @param volume
87+
* @param pitch
88+
*
89+
* @deprecated stereo is set to false
90+
*/
91+
public static void playSound(Player player, Location location, String sound,
92+
SoundCategory category, float volume, float pitch) {
93+
playSound(player, location, sound, category, volume, pitch, false);
94+
}
7995

8096
/**
8197
* Plays a sound using NMS & reflection
@@ -126,6 +142,22 @@ public static void playSound(Player player, Location location, String sound,
126142
}
127143
}
128144

145+
/**
146+
* Plays a sound using NMS & reflection
147+
* @param player
148+
* @param location
149+
* @param sound
150+
* @param category
151+
* @param volume
152+
* @param pitch
153+
*
154+
* @deprecated stereo is set to false
155+
*/
156+
public static void playSound(Player player, Location location, Sound sound,
157+
SoundCategory category, float volume, float pitch) {
158+
playSound(player, location, sound, category, volume, pitch, false);
159+
}
160+
129161
/**
130162
* Plays a sound using NMS & reflection
131163
* @param player

0 commit comments

Comments
 (0)