APISonar


io.anuke.mindustry.Vars.ui

> io > anuke > mindustry > Vars > ui
io APIs anuke APIs mindustry APIs Vars APIs ui APIs

Example 1
public static void sendMessage(String message){
        if(Vars.ui != null){
            Vars.ui.chatfrag.addMessage(message, null);
        }
    }
Example 2
public static void sendMessage(Player player, String message){
        if(message.length() > maxTextLength){
            throw new ValidateException(player, "Player has sent a message above the text limit.");
        }

        if(Vars.ui != null){
            Vars.ui.chatfrag.addMessage(message, player == null ? null : colorizeName(player.id, player.name));
        }
    }