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) {
|
public static DisguiseSound getType(String name) {
|
||||||
//TODO: FIX the disguise sounds
|
//TODO: FIX the disguise sounds
|
||||||
return null;
|
try {
|
||||||
// try {
|
return valueOf(name);
|
||||||
// return valueOf(name);
|
} catch (Exception ex) {
|
||||||
// } catch (Exception ex) {
|
return null;
|
||||||
// return null;
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashSet<String> cancelSounds = new HashSet<>();
|
private HashSet<String> cancelSounds = new HashSet<>();
|
||||||
|
@ -1099,14 +1099,15 @@ public class PacketsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setHearDisguisesListener(boolean enabled) {
|
public static void setHearDisguisesListener(boolean enabled) {
|
||||||
if (soundsListenerEnabled != enabled) {
|
//TODO: FIX SOUNDS
|
||||||
soundsListenerEnabled = enabled;
|
// if (soundsListenerEnabled != enabled) {
|
||||||
if (soundsListenerEnabled) {
|
// soundsListenerEnabled = enabled;
|
||||||
ProtocolLibrary.getProtocolManager().addPacketListener(soundsListener);
|
// if (soundsListenerEnabled) {
|
||||||
} else {
|
// ProtocolLibrary.getProtocolManager().addPacketListener(soundsListener);
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(soundsListener);
|
// } else {
|
||||||
}
|
// ProtocolLibrary.getProtocolManager().removePacketListener(soundsListener);
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setInventoryListenerEnabled(boolean enabled) {
|
public static void setInventoryListenerEnabled(boolean enabled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user