NotifMod will start downloading in 5 seconds...
STILL DOWNLOADING MANUALLY??
Join over 10 million players who use the CurseForge app!
Download App NowDescription
NotifMod
A client-side Fabric mod that gives you notifications when certain things happen!
The notifications can be in the form of a sound, a message (chat/actionbar/title) or both.
The mod is highly configurable and currently supports the following events:
- Equipment durability low
- Unbreakable equipment stopped working (elytra)
- Equipment fully repaired (mending)
- Chat message
- Chat username mention
- Able to sleep
- Your lead broke
- Player joined server
- Player left server
- Game's done loading
- World's done loading (when initially connecting)
It can also start a timer and remind you when the time's up (useful for things like breeding animals).
Dependencies
This mod depends on:
- Fabric API
- Cloth Config API
- Mod Menu (optional)
The mod will function without Mod Menu, but you won't be able to access the
in-game configuration screen, so it's recommended to include it.
Notification sounds
The mod comes with a few simple sounds you can use if you want. However, you can use any sound
in the game, or even add your own, by replacing NotifMod's sounds using a simple resource pack!
Notification filters
In the mod's settings, you'll notice that you can specify what chat messages give you notifications, using regular expressions (aka RegEx).
If you don't know what a regular expression is, it's basically a series of characters that describe a pattern to look for (match).
They're really powerful and can describe a ton of things and since this mod is meant to be highly configurable, they're perfect for the job.
If you really want to learn them and do something more complicated, you can find a lot of info or test them online, pretty easily (to get an idea, watch this and check out RegExr)!
I'll go over some very common uses of regex in this mod, to give you an idea of how to do simple things.
Getting mention notifications for many different variations of your name
If people sometimes refer to me by my username, but sometimes call me "awex", "alex", or "baka", I can use this regex: .*(\p|awex|alex|baka).*
This mod will replace any occurrences of \p with your username, before actually interpreting the regex.
We can add as many names/words as we want, inside the parentheses, separated by |.
There's a small potential issue with this: if someone says "alexa", I'll still get a notification.
To make it only consider it a mention if it's a full word, without any extra letters, we can use this: (.*\W)?(\p|awex|alex|baka)(\W.*)?
This change tells it that if there's any other characters around it, the ones immediately next to it have to be anything but letters or numbers.
The mod can also color your name, when mentioned. You'll have to use a regex pattern again, but you most likely want it to be pretty similar to the filter one, from above.
If you wanted to color different variations of your name, you could basically just omit the .* parts, e.g.: \p|awex|alex|baka
Getting notifications for private messages
This can be a bit more difficult, since private messages work using a server plugin and how it works will be different according to the plugin being used by the server etc.
The plugin might be using the "system" channel instead of "chat", so you'll have to make sure you're filtering the right channel too.
The rest comes down to what incoming private messages look like. You'll have to write the regex accordingly.
As an example, if the format of incoming messages is this: [Joe -> You] Hello!
You can use something like this: .*\[.+ -> You\] .*
You can also use it together with other things. For example, if this is for the "system" channel, but you also want to get notifications for messages coming from the server console (they'd start with [Server] and use the "system" channel too), you can combine it the same way we did with names above: (\[Server\] .*)|(.*\[.+ -> You\] .*)
Update: as of 1.19, chat messages coming from the server console do not use the "system" channel anymore, they're now on the "chat" channel.
Update 2: as of 1.19.1, chat messages coming from the server console use the "system" channel again and don't include the "[server]" part.
Issues
Please report any issues on GitHub, not here, thanks!