[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs:wiki\u002FGuides\u002FSpawn-Message":3},{"html":4,"title":-1,"frontmatter":5},"\u003Cp>\u003Cstrong>Difficulty: Beginner\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>You may have a special mob that spawns, such as a boss, that you want players on the server to know about. You can use the \u003Ca href=\"\u002Fmechanics\u002Fmessage\">Message Mechanic\u003C\u002Fa> combined with the \u003Ca href=\"\u002Ftriggers\u002Fspawn\">onSpawn Trigger\u003C\u002Fa> to achieve this.\u003C\u002Fp>\n\u003Cp>It is worth noting that this may not work for mobs spawned from a Spawner that is in currently unloaded chunks.\u003C\u002Fp>\n\u003Cp>In this basic example, we are simply sending a message to \u003Ca href=\"\u002Ftargeters\u002Fplayersonserver\">@server\u003C\u002Fa> informing them that the mob has spawned.\u003C\u002Fp>\n\u003Cpre class=\"language-yaml\">\u003Ccode class=\"language-yaml\">\u003Cspan class=\"yaml-key\">SkeletonKing\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">:\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Type\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-plain\">WITHER_SKELETON\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Display\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-string\">&#39;&amp;6Skeleton King&#39;\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Health\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-number\">500\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Damage\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-number\">10\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Skills\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">:\u003C\u002Fspan>\n  \u003Cspan class=\"yaml-plain\">-\u003C\u002Fspan> \u003Ca class=\"mythic-ref\" data-mythic-ref=\"m:message\">message\u003C\u002Fa>\u003Cspan class=\"yaml-punc\">{\u003C\u002Fspan>\u003Cspan class=\"yaml-plain\">m\u003C\u002Fspan>=\u003Cspan class=\"yaml-string\">&quot;&amp;6The Skeleton King has spawned!&quot;\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">}\u003C\u002Fspan> @\u003Ca class=\"mythic-ref\" data-mythic-ref=\"t:server\">server\u003C\u002Fa> ~\u003Ca class=\"mythic-ref\" data-mythic-ref=\"tr:onSpawn\">onSpawn\u003C\u002Fa>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This works well, but you may want to make your mob show its coordinates to players! You can use \u003Ca href=\"\u002Fdocs\u002Fwiki\u002FSkills\u002FPlaceholders\">Caster Placeholders\u003C\u002Fa> to achieve this.\u003C\u002Fp>\n\u003Cpre class=\"language-yaml\">\u003Ccode class=\"language-yaml\">\u003Cspan class=\"yaml-key\">SkeletonKing\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">:\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Type\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-plain\">WITHER_SKELETON\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Display\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-string\">&#39;&amp;6Skeleton King&#39;\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Health\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-number\">500\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Damage\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">: \u003C\u002Fspan>\u003Cspan class=\"yaml-number\">10\u003C\u002Fspan>\n\u003Cspan class=\"yaml-key\">  Skills\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">:\u003C\u002Fspan>\n  \u003Cspan class=\"yaml-plain\">-\u003C\u002Fspan> \u003Ca class=\"mythic-ref\" data-mythic-ref=\"m:message\">message\u003C\u002Fa>\u003Cspan class=\"yaml-punc\">{\u003C\u002Fspan>\u003Cspan class=\"yaml-plain\">m\u003C\u002Fspan>=\u003Cspan class=\"yaml-string\">&quot;&amp;6The Skeleton King has spawned! You can find it at, &amp;aX&lt;&amp;co&gt;&amp;b&lt;caster.l.x&gt; &amp;aY&lt;&amp;co&gt;&amp;b&lt;caster.l.y&gt; &amp;aZ&lt;&amp;co&gt;&amp;b&lt;caster.l.x&gt;&quot;\u003C\u002Fspan>\u003Cspan class=\"yaml-punc\">}\u003C\u002Fspan> @\u003Ca class=\"mythic-ref\" data-mythic-ref=\"t:server\">server\u003C\u002Fa> ~\u003Ca class=\"mythic-ref\" data-mythic-ref=\"tr:onSpawn\">onSpawn\u003C\u002Fa>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>We are using the following placeholders:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>&lt;&amp;co&gt;\u003C\u002Fcode> This will insert a \u003Ccode>:\u003C\u002Fcode> symbol which will otherwise interfere with the syntax.\u003C\u002Fli>\n\u003Cli>\u003Ccode>&lt;caster.l.x&gt;\u003C\u002Fcode> This displays the casters X coordinate\u003C\u002Fli>\n\u003Cli>\u003Ccode>&lt;caster.l.y&gt;\u003C\u002Fcode> This displays the casters Y coordinate\u003C\u002Fli>\n\u003Cli>\u003Ccode>&lt;caster.l.z&gt;\u003C\u002Fcode> This displays the casters Z coordinate\u003C\u002Fli>\n\u003C\u002Ful>\n",{"menu":6},"false",1779063036759]