aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
diff options
context:
space:
mode:
authorolim <bobq4582@gmail.com>2024-02-17 19:54:48 +0000
committerolim <bobq4582@gmail.com>2024-02-17 19:54:48 +0000
commit4a15a2c47d4e6e8c514a3bf0f62f1706d08e4b0e (patch)
tree6aee9a517b70f4d670043e4f388195ac04a7fe8d /src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
parent2787e958d990972f62834c7083978ff7012e7095 (diff)
downloadSkyblocker-4a15a2c47d4e6e8c514a3bf0f62f1706d08e4b0e.tar.gz
Skyblocker-4a15a2c47d4e6e8c514a3bf0f62f1706d08e4b0e.tar.bz2
Skyblocker-4a15a2c47d4e6e8c514a3bf0f62f1706d08e4b0e.zip
add sound effect
added the ability to choose between a few sound effects to play when a message is received
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
index 0fe1c3f1..97431305 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
@@ -3,6 +3,8 @@ package de.hysky.skyblocker.skyblock.chat;
import de.hysky.skyblocker.utils.Utils;
import net.minecraft.client.sound.Sound;
import net.minecraft.item.ItemStack;
+import net.minecraft.sound.SoundEvent;
+import net.minecraft.sound.SoundEvents;
import java.util.List;
import java.util.Objects;
@@ -28,7 +30,7 @@ public class ChatRule {
private Boolean showActionBar;
private Boolean showAnnouncement;
private String replaceMessage; //todo extract parts of original message
- private Sound customSound;
+ private SoundEvent customSound;
/**
* Creates a chat rule with default options.
*/
@@ -49,22 +51,6 @@ public class ChatRule {
this.customSound = null;
}
-
- public ChatRule(String name, Boolean enabled, Boolean isPartialMatch, Boolean isRegex, Boolean isIgnoreCase, String filter, String validLocation, List<ItemStack> validItems, Boolean hideMessage, Boolean showActionBar, Boolean showAnnouncement, String replaceMessage, Sound customSound) {
- this.name = name;
- this.enabled = enabled;
- this.isPartialMatch = isPartialMatch;
- this.isRegex = isRegex;
- this.isIgnoreCase = isIgnoreCase;
- this.filter = filter;
- this.validLocations = validLocation;
- this.hideMessage = hideMessage;
- this.showActionBar = showActionBar;
- this.showAnnouncement = showAnnouncement;
- this.replaceMessage = replaceMessage;
- this.customSound = customSound;
- }
-
public Boolean getEnabled() { //todo remove unused getters and set
return enabled;
}
@@ -137,11 +123,11 @@ public class ChatRule {
this.replaceMessage = replaceMessage;
}
- public Sound getCustomSound() {
+ public SoundEvent getCustomSound() {
return customSound;
}
- public void setCustomSound(Sound customSound) {
+ public void setCustomSound(SoundEvent customSound) {
this.customSound = customSound;
}