'use strict';
onEvent('player.inventory.changed', function (/** @type {Internal.PlayerEventJS} */ event) {
    const player = event.player;
    if (!player.player || player.fake) {
        return;
    }

    if (!event.item.hasTag('enigmatica:burning_hot')) {
        return;
    }

    if (!player.inWater) {
        player.setStatusMessage([Text.of(`A hot item is burning you!`).red()]);
        player.setOnFire(180);
        global.setOnFire = true;
    }
});
