Skip to content

Commit

Permalink
disable lobby portal sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Jun 21, 2024
1 parent 7c08a51 commit 1a99106
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/org/polyfrost/hytils/config/HytilsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -1115,11 +1115,18 @@ public class HytilsConfig extends Config {

@Switch(
name = "Disable Door Sounds",
description = "Disable sounds caused by doors, trapdoors, and fence gates",
description = "Disable sounds caused by doors, trapdoors, and fence gates.",
category = "Lobby", subcategory = "Sounds"
)
public static boolean lobbyDisableDoorSounds;

@Switch(
name = "Disable Portal Sounds",
description = "Disable sounds caused by nether portals.",
category = "Lobby", subcategory = "Sounds"
)
public static boolean lobbyDisablePortalSounds;

@Switch(
name = "Remove Limbo AFK Title",
description = "Remove the AFK title when you get sent to limbo for being AFK.",
Expand Down Expand Up @@ -1248,7 +1255,7 @@ public HytilsConfig() {
"lobbyDisableItemPickupSounds", "lobbyDisableExperienceOrbSounds", "lobbyDisablePrimedTntSounds",
"lobbyDisableExplosionSounds", "lobbyDisableDeliveryManSounds", "lobbyDisableMysteryBoxSounds",
"lobbyDisableFireworkSounds", "lobbyDisableLevelupSounds", "lobbyDisableArrowSounds", "lobbyDisableBatSounds",
"lobbyDisableFireSounds", "lobbyDisableEndermanSounds", "lobbyDisableDoorSounds"
"lobbyDisableFireSounds", "lobbyDisableEndermanSounds", "lobbyDisableDoorSounds", "lobbyDisablePortalSounds"
).forEach(property -> addDependency(property, "Silent Lobby", () -> !silentLobby));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public void onSoundPlay(PlaySoundEvent event) {
if (sound.startsWith("random.door") && HytilsConfig.lobbyDisableDoorSounds) {
event.result = null;
}

if (sound.startsWith("portal.portal") && HytilsConfig.lobbyDisablePortalSounds) {
event.result = null;
}
}
}
}
Expand Down

0 comments on commit 1a99106

Please sign in to comment.