LibuLib
Discord
  • Import using Gradle
  • LibuWeapons
  • Custom Generation
  • Libu UI
    • LibuToast
  • Util
Powered by GitBook
On this page
  1. Libu UI

LibuToast

Toasts but easier

This class is only client-side, and will crash if this class is in a server-side class.

LibuToast is a faster way of creating Toasts in Minecraft. Here's how to make one and display it:

import com.lumaa.libu.client.ui.LibuToast;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import org.jetbrains.annotations.Nullable;

@Environment(EnvType.CLIENT)
public class YourClass {
    public static final LibuToast myLibuToast = new LibuToast(@Nullable ItemStack icon, MutableText title, MutableText description);
    
    public void showMyAwesomeToast() {
        myLibuToast.display();
        
        // That's it.
    }
}
PreviousLibu UINextUtil

Last updated 2 years ago