<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Where is the mistake?]]></title><description><![CDATA[<p dir="auto">help me!Why can't it be detected?</p>
<pre><code>var S45PacketTitle = Java.type("net.minecraft.network.play.server.S45PacketTitle");

	this.onPacket = function(event) {
			var packet = event.getPacket();
			if(packet instanceof S45PacketTitle) {
				if(packet.getType().equals(S45PacketTitle.Type.TITLE)) {
					var text = packet.getMessage().getUnformattedText();
					if (text.equals("Victory!")) { //problem
						mc.thePlayer.sendChatMessage("GG");
					}
			}
}
</code></pre>
]]></description><link>https://forum.liquidbounce.net/topic/570/where-is-the-mistake</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 05:58:34 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/570.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 05 Sep 2020 08:56:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Where is the mistake? on Wed, 09 Sep 2020 13:16:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/butterchicken" aria-label="Profile: ButterChicken">@<bdi>ButterChicken</bdi></a> That's what you were supposed to do.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/czechhek" aria-label="Profile: CzechHek">@<bdi>CzechHek</bdi></a> said in <a href="/post/4199">Where is the mistake?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/butterchicken" aria-label="Profile: ButterChicken">@<bdi>ButterChicken</bdi></a> Title messages are often in siblings or smth, print the component and find where the "Victory!" is.</p>
</blockquote>
<p dir="auto">Here is the documentation: <a href="https://scriptapi.liquidbounce.net/net/minecraft/util/ChatComponentText.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://scriptapi.liquidbounce.net/net/minecraft/util/ChatComponentText.html</a></p>
]]></description><link>https://forum.liquidbounce.net/post/4474</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4474</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Wed, 09 Sep 2020 13:16:14 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Wed, 09 Sep 2020 13:05:58 GMT]]></title><description><![CDATA[<p dir="auto">So have figured out a solution?</p>
]]></description><link>https://forum.liquidbounce.net/post/4473</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4473</guid><dc:creator><![CDATA[ButterChicken]]></dc:creator><pubDate>Wed, 09 Sep 2020 13:05:58 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Mon, 07 Sep 2020 16:35:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/czechhek" aria-label="Profile: CzechHek">@<bdi>CzechHek</bdi></a> nvm I was blind</p>
<pre><code>if (text.equals("Victory!")) { //problem
    mc.thePlayer.sendChatMessage("GG");
} else chat.print(packet.getMessage()) // anyway that's better
</code></pre>
]]></description><link>https://forum.liquidbounce.net/post/4345</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4345</guid><dc:creator><![CDATA[commandblock2]]></dc:creator><pubDate>Mon, 07 Sep 2020 16:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Mon, 07 Sep 2020 12:47:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/commandblock2" aria-label="Profile: commandblock2">@<bdi>commandblock2</bdi></a> Text would probably return "". So he would need to get siblings and stuff to get the msg. String.contains() is in Nashorn tho.</p>
]]></description><link>https://forum.liquidbounce.net/post/4336</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4336</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Mon, 07 Sep 2020 12:47:19 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Mon, 07 Sep 2020 11:17:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/butterchicken" aria-label="Profile: ButterChicken">@<bdi>ButterChicken</bdi></a> said in <a href="/post/4192">Where is the mistake?</a>:</p>
<blockquote>
<p dir="auto">if (text.equals("Victory!")) { //problem<br />
mc.thePlayer.sendChatMessage("GG");<br />
}</p>
</blockquote>
<pre><code>if (text.equals("Victory!")) { //problem
    mc.thePlayer.sendChatMessage("GG");
} else chat.print(text) //So that u can actually see what the title really is (exact string will be shown in [CHAT in .minecraft/logs/latest.txt)
</code></pre>
<p dir="auto">but anyway I suggest to find/match part of the string. like <code>text.contains("Victory")</code> but it seemed that there is no such method in nashorn so u might have to use <code>text.indexOf("Victory") != -1</code></p>
]]></description><link>https://forum.liquidbounce.net/post/4329</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4329</guid><dc:creator><![CDATA[commandblock2]]></dc:creator><pubDate>Mon, 07 Sep 2020 11:17:28 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Sat, 05 Sep 2020 10:00:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/butterchicken" aria-label="Profile: ButterChicken">@<bdi>ButterChicken</bdi></a> Title messages are often in siblings or smth, print the component and find where the "Victory!" is.</p>
]]></description><link>https://forum.liquidbounce.net/post/4199</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4199</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Sat, 05 Sep 2020 10:00:43 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Sat, 05 Sep 2020 09:10:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/idkwhome-v2" aria-label="Profile: idkwhome-v2">@<bdi>idkwhome-v2</bdi></a> How to deal with it?</p>
]]></description><link>https://forum.liquidbounce.net/post/4196</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4196</guid><dc:creator><![CDATA[ButterChicken]]></dc:creator><pubDate>Sat, 05 Sep 2020 09:10:33 GMT</pubDate></item><item><title><![CDATA[Reply to Where is the mistake? on Sat, 05 Sep 2020 08:59:25 GMT]]></title><description><![CDATA[<p dir="auto">gettype()</p>
]]></description><link>https://forum.liquidbounce.net/post/4194</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/4194</guid><dc:creator><![CDATA[idkwhome v2]]></dc:creator><pubDate>Sat, 05 Sep 2020 08:59:25 GMT</pubDate></item></channel></rss>