net.minecraft.util.IChatComponent Java Examples

The following examples show how to use net.minecraft.util.IChatComponent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MixinGuiScreen.java    From LiquidBounce with GNU General Public License v3.0 8 votes vote down vote up
@Shadow
public abstract void handleComponentHover(IChatComponent component, int x, int y);
 
Example #2
Source File: NetworkHandler.java    From Hyperium with GNU Lesser General Public License v3.0 7 votes vote down vote up
@Override
public void handleChat(String s) {
    if (s.toLowerCase().contains("reconnecting hyperium connection")) return;
    Hyperium.LOGGER.debug("Chat: {}", s);
    s = s.replace("&", C.COLOR_CODE_SYMBOL);
    IChatComponent chatComponent = new ChatComponentText("");

    Arrays.stream(s.split(" ")).forEach(s1 -> {
        ChatComponentText iChatComponents = new ChatComponentText(s1 + " ");
        if (s1.contains(".") && !s1.startsWith(".") && !s1.endsWith(".")) {
            ChatStyle chatStyle = new ChatStyle();
            chatStyle.setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, s1.startsWith("http") ? s1 : "http://" + s1));
            iChatComponents.setChatStyle(chatStyle);
        }
        chatComponent.appendSibling(iChatComponents);
    });

    GeneralChatHandler.instance().sendMessage(chatComponent);
}
 
Example #3
Source File: CommandsOutsider.java    From MyTown2 with The Unlicense 6 votes vote down vote up
@Command(
        name = "prices",
        permission = "mytown.cmd.outsider.prices",
        parentName = "mytown.cmd",
        syntax = "/town prices")
public static CommandResponse pricesCommand(ICommandSender sender, List<String> args) {
    Resident res = getUniverse().getOrMakeResident(sender);

    IChatComponent header = LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|PRICES}"));
    ChatManager.send(sender, "mytown.notification.prices",
            header,
            EconomyProxy.getCurrency(Config.instance.costAmountMakeTown.get()),
            EconomyProxy.getCurrency(Config.instance.costAmountClaim.get()),
            EconomyProxy.getCurrency(Config.instance.costAdditionClaim.get()),
            EconomyProxy.getCurrency(Config.instance.costAmountClaimFar.get()),
            EconomyProxy.getCurrency(Config.instance.costAmountSpawn.get()),
            EconomyProxy.getCurrency(Config.instance.costAmountSetSpawn.get()),
            EconomyProxy.getCurrency(Config.instance.costAmountOtherSpawn.get()),
            EconomyProxy.getCurrency(Config.instance.costTownUpkeep.get()),
            EconomyProxy.getCurrency(Config.instance.costAdditionalUpkeep.get()));

    return CommandResponse.DONE;
}
 
Example #4
Source File: CommandsOutsider.java    From MyTown2 with The Unlicense 6 votes vote down vote up
@Command(
        name = "res",
        permission = "mytown.cmd.outsider.res",
        parentName = "mytown.cmd",
        syntax = "/town res <resident>",
        completionKeys = {"residentCompletion"},
        console = true)
public static CommandResponse resCommand(ICommandSender sender, List<String> args) {
    if (args.size() < 1) {
        return CommandResponse.SEND_SYNTAX;
    }

    Resident res = getResidentFromName(args.get(0));
    if (res == null) {
        throw new MyTownCommandException("mytown.cmd.err.resident.missing", args.get(0));
    }
    IChatComponent header = LocalManager.get("myessentials.format.list.header", res);
    ChatManager.send(sender, "mytown.format.resident.long", header, res.townsContainer, Formatter.formatDate(res.getJoinDate()), Formatter.formatDate(res.getLastOnline()), res.getExtraBlocks());
    return CommandResponse.DONE;
}
 
Example #5
Source File: CommandsEveryone.java    From MyTown2 with The Unlicense 6 votes vote down vote up
@Command(
        name = "list",
        permission = "mytown.cmd.everyone.ranks.list",
        parentName = "mytown.cmd.everyone.ranks",
        syntax = "/town ranks list")
public static CommandResponse listRanksCommand(ICommandSender sender, List<String> args) {
    Resident res = MyTownUniverse.instance.getOrMakeResident(sender);
    Town town = getTownFromResident(res);

    IChatComponent root = new ChatComponentList();
    root.appendSibling(LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|RANKS}")));
    for (Rank rank : town.ranksContainer) {
        root.appendSibling(new ChatComponentFormatted("{7| - }").appendSibling(LocalManager.get("mytown.format.rank.long", rank.getName(), rank.getType())));
    }

    ChatManager.send(sender, root);
    return CommandResponse.DONE;
}
 
Example #6
Source File: MixinGuiChat.java    From LiquidBounce with GNU General Public License v3.0 6 votes vote down vote up
/**
 * @author CCBlueX
 */
@Overwrite
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    Gui.drawRect(2, this.height - (int) fade, this.width - 2, this.height, Integer.MIN_VALUE);
    this.inputField.drawTextBox();

    if (LiquidBounce.commandManager.getLatestAutoComplete().length > 0 && !inputField.getText().isEmpty() && inputField.getText().startsWith(String.valueOf(LiquidBounce.commandManager.getPrefix()))) {
        String[] latestAutoComplete = LiquidBounce.commandManager.getLatestAutoComplete();
        String[] textArray = inputField.getText().split(" ");
        String trimmedString = latestAutoComplete[0].replaceFirst("(?i)" + textArray[textArray.length - 1], "");

        mc.fontRendererObj.drawStringWithShadow(trimmedString, inputField.xPosition + mc.fontRendererObj.getStringWidth(inputField.getText()), inputField.yPosition, new Color(165, 165, 165).getRGB());
    }

    IChatComponent ichatcomponent =
            this.mc.ingameGUI.getChatGUI().getChatComponent(Mouse.getX(), Mouse.getY());

    if (ichatcomponent != null)
        this.handleComponentHover(ichatcomponent, mouseX, mouseY);
}
 
Example #7
Source File: HyperiumEntityPlayer.java    From Hyperium with GNU Lesser General Public License v3.0 6 votes vote down vote up
public IChatComponent getDisplayName() {
    if (cachedName == null || System.currentTimeMillis() - lastChangeTime > 50L) {
        IChatComponent ichatcomponent = new ChatComponentText(ScorePlayerTeam
            .formatPlayerName(parent.getTeam(), displayName));
        ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + parent.getName() + " "));
        //Unneeded for client
        if (Minecraft.getMinecraft().isIntegratedServerRunning()) {
            ichatcomponent.getChatStyle()
                .setChatHoverEvent(((IMixinEntity) parent).callGetHoverEvent());
        }
        ichatcomponent.getChatStyle().setInsertion(parent.getName());
        cachedName = ichatcomponent;
    }

    return cachedName;
}
 
Example #8
Source File: CommandsAdmin.java    From MyTown2 with The Unlicense 6 votes vote down vote up
@Command(
        name = "info",
        permission = "mytown.adm.cmd.plot.info",
        parentName = "mytown.adm.cmd.plot",
        syntax = "/townadmin plot info <town> <plot>",
        completionKeys = {"townCompletion", "plotCompletion"},
        console = true)
public static CommandResponse plotInfoCommand(ICommandSender sender, List<String> args) {
    if (args.size() < 2) {
        return CommandResponse.SEND_SYNTAX;
    }

    Town town = getTownFromName(args.get(0));
    Plot plot = getPlotFromName(town, args.get(1));

    IChatComponent header = LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|%s}", plot.getName()));
    ChatManager.send(sender, "mytown.format.plot.long", plot.ownersContainer, plot.toVolume().toChatMessage());
    return CommandResponse.DONE;
}
 
Example #9
Source File: MixinGuiChat.java    From LiquidBounce with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @author CCBlueX
 */
@Overwrite
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    Gui.drawRect(2, this.height - (int) fade, this.width - 2, this.height, Integer.MIN_VALUE);
    this.inputField.drawTextBox();

    IChatComponent ichatcomponent =
            this.mc.ingameGUI.getChatGUI().getChatComponent(Mouse.getX(), Mouse.getY());

    if (ichatcomponent != null)
        this.handleComponentHover(ichatcomponent, mouseX, mouseY);
}
 
Example #10
Source File: ClientUtils.java    From LiquidBounce with GNU General Public License v3.0 5 votes vote down vote up
public static void displayChatMessage(final String message) {
    if (mc.thePlayer == null) {
        getLogger().info("(MCChat)" + message);
        return;
    }

    final JsonObject jsonObject = new JsonObject();
    jsonObject.addProperty("text", message);

    mc.thePlayer.addChatMessage(IChatComponent.Serializer.jsonToComponent(jsonObject.toString()));
}
 
Example #11
Source File: CommandsAdmin.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Command(
        name = "info",
        permission = "mytown.adm.cmd.blocks.info",
        parentName = "mytown.adm.cmd.blocks",
        syntax = "/townadmin blocks info <town>",
        completionKeys = {"townCompletion"},
        console = true)
public static CommandResponse blocksInfoCommand(ICommandSender sender, List<String> args) {
    if(args.size() < 1) {
        return CommandResponse.SEND_SYNTAX;
    }

    Town town = getTownFromName(args.get(0));

    IChatComponent header = LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|BLOCKS}"));
    String blocks = town.townBlocksContainer.size() + "/" + town.getMaxBlocks();
    String extraBlocks = town.getExtraBlocks() + "";
    String farBlocks = town.townBlocksContainer.getFarClaims() + "/" + town.getMaxFarClaims();

    ChatComponentContainer extraBlocksSources = new ChatComponentContainer();
    extraBlocksSources.add(LocalManager.get("mytown.notification.blocks.info.extra", new ChatComponentFormatted("{9|TOWN}"), town.townBlocksContainer.getExtraBlocks()));
    for(Resident res : town.residentsMap.keySet()) {
        extraBlocksSources.add(LocalManager.get("mytown.notification.blocks.info.extra", res, res.getExtraBlocks()));
    }

    ChatManager.send(sender, "mytown.notification.blocks.info", header, blocks, extraBlocks, extraBlocksSources, farBlocks);
    return CommandResponse.DONE;
}
 
Example #12
Source File: MixinGuiScreen.java    From LiquidBounce with GNU General Public License v3.0 5 votes vote down vote up
@Inject(method = "handleComponentHover", at = @At("HEAD"))
private void handleHoverOverComponent(IChatComponent component, int x, int y, final CallbackInfo callbackInfo) {
    if (component == null || component.getChatStyle().getChatClickEvent() == null || !LiquidBounce.moduleManager.getModule(ComponentOnHover.class).getState())
        return;

    final ChatStyle chatStyle = component.getChatStyle();

    final ClickEvent clickEvent = chatStyle.getChatClickEvent();
    final HoverEvent hoverEvent = chatStyle.getChatHoverEvent();

    drawHoveringText(Collections.singletonList("§c§l" + clickEvent.getAction().getCanonicalName().toUpperCase() + ": §a" + clickEvent.getValue()), x, y - (hoverEvent != null ? 17 : 0));
}
 
Example #13
Source File: GuiScreenHook.java    From SkyblockAddons with MIT License 5 votes vote down vote up
public static void handleComponentClick(IChatComponent component) {
    SkyblockAddons main = SkyblockAddons.getInstance();
    if (main.getUtils().isOnSkyblock() && component != null && "§2§l[OPEN MENU]".equals(component.getUnformattedText()) &&
            !CooldownManager.isOnCooldown(InventoryUtils.MADDOX_BATPHONE_DISPLAYNAME)) {// The prompt when Maddox picks up the phone.
        CooldownManager.put(InventoryUtils.MADDOX_BATPHONE_DISPLAYNAME, MADDOX_BATPHONE_COOLDOWN);
    }
}
 
Example #14
Source File: Rank.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent root = new ChatComponentText("");

    for (Rank rank : this) {
        if (root.getSiblings().size() > 0) {
            root.appendSibling(new ChatComponentFormatted("{7|, }"));
        }
        root.appendSibling(rank.toChatMessage());
    }

    return root;
}
 
Example #15
Source File: MixinGuiDisconnecting.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Invoked once the player is disconnecting from a server
 */
@Inject(method = "<init>", at = @At("RETURN"))
private void init(GuiScreen screen,
                  String reasonLocalizationKey,
                  IChatComponent chatComp,
                  CallbackInfo ci) {
    EventBus.INSTANCE.post(new ServerLeaveEvent());
}
 
Example #16
Source File: Town.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent root = new ChatComponentText("");

    for (Town town : this) {
        if (root.getSiblings().size() > 0) {
            root.appendSibling(new ChatComponentFormatted("{7|, }"));
        }
        root.appendSibling(town.toChatMessage());
    }

    return root;
}
 
Example #17
Source File: TownBlock.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent root = new ChatComponentText("");

    for (TownBlock block : values()) {
        root.appendSibling(block.toChatMessage());
        root.appendSibling(new ChatComponentText(" "));
    }

    return root;
}
 
Example #18
Source File: Town.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent header = LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|%s}", getName()));
    IChatComponent hoverComponent = ((ChatComponentFormatted)LocalManager.get("mytown.format.town.long", header, residentsMap.size(), townBlocksContainer.size(), getMaxBlocks(), plotsContainer.size(), residentsMap, ranksContainer)).applyDelimiter("\n");

    return LocalManager.get("mytown.format.town.short", name, hoverComponent);
}
 
Example #19
Source File: GuiNewChatHook.java    From SkyblockAddons with MIT License 5 votes vote down vote up
public static String getUnformattedText(IChatComponent iChatComponent) {
    SkyblockAddons main = SkyblockAddons.getInstance();
    ICommandSender player = Minecraft.getMinecraft().thePlayer;
    if (main != null && SkyblockAddonsTransformer.isDeobfuscated() || (player != null && player.getName().equals("Biscut"))) {
        return iChatComponent.getFormattedText(); // makes it easier for debugging
    }
    return iChatComponent.getUnformattedText();
}
 
Example #20
Source File: CommandsOutsider.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Command(
        name = "info",
        permission = "mytown.cmd.outsider.info",
        parentName = "mytown.cmd",
        syntax = "/town info [town]",
        completionKeys = {"townCompletionAndAll"},
        console = true)
public static CommandResponse infoCommand(ICommandSender sender, List<String> args) {
    List<Town> towns = new ArrayList<Town>();

    if (args.size() < 1) {
        if (sender instanceof EntityPlayer) {
            Resident res = MyTownUniverse.instance.getOrMakeResident(sender);
            towns.add(getTownFromResident(res));
        } else {
            throw new MyTownCommandException("mytown.cmd.err.notPlayer");
        }
    } else {
        if ("@a".equals(args.get(0))) {
            towns = new ArrayList<Town>(getUniverse().towns);
            // TODO Sort
        } else {
            if(getTownFromName(args.get(0)) != null) {
                towns.add(getTownFromName(args.get(0)));
            }
        }
    }

    for (Town town : towns) {
        IChatComponent header = LocalManager.get("myessentials.format.list.header", new ChatComponentFormatted("{9|%s}", town.getName()));
        ChatManager.send(sender, "mytown.format.town.long", header, town.residentsMap.size(), town.townBlocksContainer.size(), town.getMaxBlocks(), town.plotsContainer.size(), town.residentsMap, town.ranksContainer);
    }
    return CommandResponse.DONE;
}
 
Example #21
Source File: UniversalUtil.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static String getUnformattedText(Object component) {
    if (component == null) {
        return null;
    }

    String unformattedText = ((IChatComponent) component).getUnformattedText();
    return ChatColor.stripColor(unformattedText);
}
 
Example #22
Source File: Plot.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent root = new ChatComponentText("");

    for (Plot plot : this) {
        if (root.getSiblings().size() > 0) {
            root.appendSibling(new ChatComponentFormatted("{7|, }"));
        }
        root.appendSibling(plot.toChatMessage());
    }

    return root;
}
 
Example #23
Source File: Resident.java    From MyTown2 with The Unlicense 5 votes vote down vote up
@Override
public IChatComponent toChatMessage() {
    IChatComponent root = new ChatComponentText("");

    for (Resident res : this) {
        if (root.getSiblings().size() > 0) {
            root.appendSibling(new ChatComponentFormatted("{7|, }"));
        }
        root.appendSibling(res.toChatMessage());
    }
    return root;
}
 
Example #24
Source File: UpdateChecker.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
@InvokeEvent
public void serverJoinEvent(ServerJoinEvent event) {
    if (asked) return; //If they were already asked, don't even make the new thread.
    UpdateUtils updateUtils = new UpdateUtils();
    Multithreading.runAsync(() -> {
        boolean latest = updateUtils.isAbsoluteLatest();
        boolean beta = updateUtils.isBeta();
        int version = Metadata.getVersionID();
        Hyperium.LOGGER.info("version is: " + version);
        if (beta) return; // dont alert beta users
        if (latest) return; //If they're on the latest version, I don't want to mess with them.

        Hyperium.INSTANCE.getNotification().display("You have an update pending.",
            "Click here to be sent to the installer.",
            10f,
            null, () -> {
                try {
                    Desktop.getDesktop().browse(new URI("https://hyperium.cc/downloads"));
                } catch (IOException | URISyntaxException e) {
                    IChatComponent urlComponent = new
                        ChatComponentText(ChatColor.RED + "[Hyperium] " +
                        ChatColor.GRAY + "Click to be sent to update Hyperium");
                    urlComponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://hyperium.cc/downloads"));
                    Hyperium.INSTANCE.getHandlers().getGeneralChatHandler().sendMessage(urlComponent);
                }
            }, new Color(200, 150, 50));
        asked = true;
    });
}
 
Example #25
Source File: DamageSourcePneumaticCraft.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns the message to be displayed on player death.
 */
@Override
public IChatComponent func_151519_b(EntityLivingBase par1EntityLivingBase){
    String messageMeta = "";
    int messageNumber = par1EntityLivingBase.getRNG().nextInt(deathMessages) + 1;
    messageMeta = messageNumber + "";

    EntityLivingBase entitylivingbase1 = par1EntityLivingBase.func_94060_bK();
    String s = "death.attack." + damageType + messageMeta;
    String s1 = s + ".player";
    return entitylivingbase1 != null && StatCollector.canTranslate(s1) ? new ChatComponentTranslation(s1, new Object[]{par1EntityLivingBase.func_145748_c_(), entitylivingbase1.func_145748_c_()}) : new ChatComponentTranslation(s, new Object[]{par1EntityLivingBase.func_145748_c_()});
}
 
Example #26
Source File: GuildChatHandler.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean chatReceived(IChatComponent component, String text) {
    String playerJoinEndStr = " joined the guild!";
    if (text.endsWith(playerJoinEndStr) && Settings.SEND_GUILD_WELCOME_MESSAGE) {
        int rankHeader = 0;
        if (text.contains("[")) rankHeader = text.indexOf("]") + 1;

        String playerName = String.valueOf(text.subSequence(rankHeader, text.length() - playerJoinEndStr.length())).trim();
        String message = "/gc Welcome to the guild " + playerName + "!";

        Minecraft.getMinecraft().thePlayer.sendChatMessage(message);
    }

    return false;
}
 
Example #27
Source File: QuestTrackingChatHandler.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean chatReceived(IChatComponent component, String text) {
    Matcher matcher = regexPatterns.get(ChatRegexType.QUEST_COMPLETE).matcher(text);

    if (matcher.matches()) {
        JsonObject record = new JsonObject();
        record.add("name", new JsonPrimitive(matcher.group("name")));
        record.add("type", new JsonPrimitive(matcher.group("type")));
        record.add("timestamp", new JsonPrimitive(System.currentTimeMillis()));
        json.add(record);
        save();
    }

    return false;
}
 
Example #28
Source File: IGWSupportNotifier.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
public void onPlayerJoin(TickEvent.PlayerTickEvent event){
    if(event.player.worldObj.isRemote && event.player == FMLClientHandler.instance().getClientPlayerEntity()) {
        event.player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a("[\"" + EnumChatFormatting.GOLD + "The mod " + supportingMod + " is supporting In-Game Wiki mod. " + EnumChatFormatting.GOLD + "However, In-Game Wiki isn't installed! " + "[\"," + "{\"text\":\"Download Latest\",\"color\":\"green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/igwmod_download\"}}," + "\"]\"]"));
        FMLCommonHandler.instance().bus().unregister(this);
    }
}
 
Example #29
Source File: MixinGuiScreen.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Inject(
    method = "handleComponentClick",
    at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiScreen;sendChatMessage(Ljava/lang/String;Z)V")
)
private void runCommand(IChatComponent chatComponent, CallbackInfoReturnable<Boolean> cir) {
    Hyperium.INSTANCE.getHandlers().getHyperiumCommandHandler().runningCommand = true;
}
 
Example #30
Source File: ConsoleGui.java    From ehacks-pro with GNU General Public License v3.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public IChatComponent getChatComponent(int mouseX, int mouseY) {
    if (!this.getChatOpen()) {
        return null;
    } else {
        ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int k = scaledresolution.getScaleFactor();
        float f = this.getChatScale();
        int l = mouseX / k - 3;
        int i1 = mouseY / k - 27;
        l = MathHelper.floor_float(l / f);
        i1 = MathHelper.floor_float(i1 / f);

        if (l >= 0 && i1 >= 0) {
            int j1 = Math.min(this.getLineCount(), this.drawnChatLines.size());

            if (l <= MathHelper.floor_float(this.getChatWidth() / this.getChatScale()) && i1 < this.mc.fontRenderer.FONT_HEIGHT * j1 + j1) {
                int k1 = i1 / this.mc.fontRenderer.FONT_HEIGHT + this.scrollPos;

                if (k1 >= 0 && k1 < this.drawnChatLines.size()) {
                    ChatLine chatline = this.drawnChatLines.get(k1);
                    int l1 = 0;

                    for (Object iChatComponent : chatline.func_151461_a()) {
                        if (iChatComponent instanceof ChatComponentText) {
                            l1 += this.mc.fontRenderer.getStringWidth(this.func_146235_b(((ChatComponentText) iChatComponent).getChatComponentText_TextValue()));

                            if (l1 > l) {
                                return (IChatComponent) iChatComponent;
                            }
                        }
                    }
                }

                return null;
            } else {
                return null;
            }
        } else {
            return null;
        }
    }
}