Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
symt authored Oct 7, 2024
1 parent 6d4b7ca commit 2f8e1d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/main/java/dev/meyi/bn/json/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ public void updateStatus() {
RenderUtils.chatNotification(this, "MATCHED");
} else if (OrderStatus.OUTDATED.equals(newOrderStatus)) {
RenderUtils.chatNotification(this, "OUTDATED");
RenderUtils.sendSound();

RenderUtils.sendSound(); // might be loud if multiple become oudated at the same time
}
this.orderStatus = newOrderStatus;
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/dev/meyi/bn/utilities/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ public static int getStringWidth(String string) {
}

public static void sendSound() {
if (!BazaarNotifier.config.sendSound) return;
Minecraft.getMinecraft().thePlayer.playSound("mob.horse.donkey.death", 2.0F, 1.0F); // Todo: add option for which sound to play (possibly)
if (BazaarNotifier.config.sendSound) {
Minecraft.getMinecraft().thePlayer.playSound("mob.horse.donkey.death", 2.0F, 1.0F);
// TODO: add option for which sound to play (possibly)
}
}
public static void chatNotification(Order order, String notification) {
if (!BazaarNotifier.config.showChatMessages) {
Expand Down

0 comments on commit 2f8e1d4

Please sign in to comment.