nageyqma·git
HTTPS https://git.nageyqma.icu/nageyqma/blade-addons-next.git SSH git@git.nageyqma.icu:nageyqma/blade-addons-next.git

HTTPS 链接可直接 git clone;推送代码请使用 SSH。

801 B · 35 行raw
1234567891011121314151617181920212223242526272829303132333435
package blade.addon.features.notifications;

import blade.addon.utils.config.components.CombineableNotification;
import config.practical.hud.HUDCategory;
import net.minecraft.network.chat.Component;

import java.util.List;

public class NotificationDisplay extends CombineableNotification {

    public NotificationDisplay() {
        super("Chat notification");
    }

    @Override
    public boolean enabled() {
        return true;
    }

    @Override
    public Component getText() {
        return Component.literal(Notifications.getMessage() != null ? Notifications.getMessage() : "Some notification");
    }

    @Override
    public boolean shouldRender() {
        return Notifications.tick > 0;
    }

    @Override
    public List<HUDCategory> categories() {
        return null;
    }
}