Skip to content

Commit

Permalink
- Renamed variable in SecretChimeConfig for clarity.
Browse files Browse the repository at this point in the history
- Added warning message for Open Link button in SecretChimeConfig.
  • Loading branch information
Ovi committed Sep 7, 2024
1 parent 629d09e commit 8d1d435
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ public class SecretChimeConfig {
@Expose
@ConfigOption(name = "Secret Chime Sound", desc = "The sound played for the secret chime.")
@ConfigEditorText
public String name = "random.orb";
public String soundName = "random.orb";

@Expose
@ConfigOption(name = "Pitch", desc = "The pitch of the secret chime sound.")
@ConfigEditorSlider(minValue = 0.5f, maxValue = 2.0f, minStep = 0.1f)
public float pitch = 1.0f;
public float soundPitch = 1.0f;


@ConfigOption(name = "Sounds", desc = "Click to open the list of available sounds.")
@ConfigOption(name = "Sounds", desc = "Click to open the list of available sounds. \n§l§cWarning: Clicking this will open a webpage in your browser.")
@ConfigEditorButton(buttonText = "OPEN")
public Runnable sounds = () -> OSUtils.openBrowser("https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2213619-1-8-all-playsound-sound-arguments");

public Runnable soundsListURL = () -> OSUtils.openBrowser("https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2213619-1-8-all-playsound-sound-arguments");

@ConfigOption(name = "Play Sound", desc = "Plays current secret chime sound.")
@ConfigEditorButton(buttonText = "Play")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object DungeonSecretChime {
@JvmStatic
fun playSound() {
with(config) {
SoundUtils.createSound(name, pitch, 100f)
SoundUtils.createSound(soundName, soundPitch, 100f)
.playSound()
}
}
Expand Down

0 comments on commit 8d1d435

Please sign in to comment.