Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

minecraft fabric client message

import net.minecraft.text.LiteralText;
import net.minecraft.client.MinecraftClient;
import net.minecraft.util.Formatting;

//send a client message in chat, only client can see
MinecraftClient.getInstance().player.
    sendMessage(new LiteralText("message").
    formatted(Formatting.WHITE),false);

//this one shows message above hotbar
MinecraftClient.getInstance().player.
    sendMessage(new LiteralText("another message").
    formatted(Formatting.WHITE),true);
 
PREVIOUS NEXT
Tagged: #minecraft #fabric #client #message
ADD COMMENT
Topic
Name
1+8 =