#How to detect potion effect

1 messages · Page 1 of 1 (latest)

fringe torrent
#

Hello, I am new to modding and Im not sure how to detect if someone gets a potion effect.

For example:

If someone got Absorption then log it.

astral valve
#
if (player.hasStatusEffect(StatusEffects.ABSORPTION)) {
    player.sendMessage(Text.literal("You have absorption!"), false);
}
fringe torrent
#

sorry I mean like I want an event when someone gets a potion effect in my class

astral valve
#

probably doesnt exist

placid dragon
#

yeah

astral valve
#

what are you trying to do?

fringe torrent
#

im trying to have a book detect if a person gets a potion effect then logs it in a book