mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-11 01:38:07 +02:00
Prevent sound listener from being registered, should prevent sounds from borking anything else until we can get it fixed
This commit is contained in:
parent
207e4574fd
commit
61f091308c
@ -79,12 +79,11 @@ public enum DisguiseSound {
|
||||
|
||||
public static DisguiseSound getType(String name) {
|
||||
//TODO: FIX the disguise sounds
|
||||
return null;
|
||||
// try {
|
||||
// return valueOf(name);
|
||||
// } catch (Exception ex) {
|
||||
// return null;
|
||||
// }
|
||||
try {
|
||||
return valueOf(name);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private HashSet<String> cancelSounds = new HashSet<>();
|
||||
|
@ -1099,14 +1099,15 @@ public class PacketsManager {
|
||||
}
|
||||
|
||||
public static void setHearDisguisesListener(boolean enabled) {
|
||||
if (soundsListenerEnabled != enabled) {
|
||||
soundsListenerEnabled = enabled;
|
||||
if (soundsListenerEnabled) {
|
||||
ProtocolLibrary.getProtocolManager().addPacketListener(soundsListener);
|
||||
} else {
|
||||
ProtocolLibrary.getProtocolManager().removePacketListener(soundsListener);
|
||||
}
|
||||
}
|
||||
//TODO: FIX SOUNDS
|
||||
// if (soundsListenerEnabled != enabled) {
|
||||
// soundsListenerEnabled = enabled;
|
||||
// if (soundsListenerEnabled) {
|
||||
// ProtocolLibrary.getProtocolManager().addPacketListener(soundsListener);
|
||||
// } else {
|
||||
// ProtocolLibrary.getProtocolManager().removePacketListener(soundsListener);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public static void setInventoryListenerEnabled(boolean enabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user