Prevent sound listener from being registered, should prevent sounds from borking anything else until we can get it fixed

This commit is contained in:
NavidK0 2016-03-14 05:26:22 -04:00
parent 207e4574fd
commit 61f091308c
2 changed files with 14 additions and 14 deletions

View File

@ -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<>();

View File

@ -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) {