<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Molang_Server_Functions</id>
	<title>Molang Server Functions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cobblemon.com/index.php?action=history&amp;feed=atom&amp;title=Molang_Server_Functions"/>
	<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Server_Functions&amp;action=history"/>
	<updated>2026-05-10T07:01:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.cobblemon.com/index.php?title=Molang_Server_Functions&amp;diff=5777&amp;oldid=prev</id>
		<title>JPAKx4: Added Molang Server Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.cobblemon.com/index.php?title=Molang_Server_Functions&amp;diff=5777&amp;oldid=prev"/>
		<updated>2025-04-19T22:49:43Z</updated>

		<summary type="html">&lt;p&gt;Added Molang Server Functions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Type is &amp;lt;code&amp;gt;ObjectValue&amp;lt;MinecraftServer&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable fixed-header sortable&amp;quot;&lt;br /&gt;
!Name!!Description!!Usage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;get_world(dimension: ResourceLocation): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|If &amp;lt;code&amp;gt;dimension&amp;lt;/code&amp;gt; is valid then returns an &amp;lt;code&amp;gt;ObjectValue&amp;lt;World&amp;gt;&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.get_world(&amp;#039;minecraft:nether&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;broadcast(message: String, bypassHiddenChat: Boolean?): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Sends the &amp;lt;code&amp;gt;message&amp;lt;/code&amp;gt; to all players. &amp;lt;code&amp;gt;bypassHiddenChat&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; by default.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.broadcast(&amp;#039;Hello World!&amp;#039;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;get_player_by_uuid(uuid: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|If &amp;lt;code&amp;gt;uuid&amp;lt;/code&amp;gt; is a valid UUID then returns an &amp;lt;code&amp;gt;ObjectValue&amp;lt;Player&amp;gt;&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.get_player_by_uuid(v.player_uuid)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;get_player_by_username(name: String): MoValue&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|If &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is a valid name then returns an &amp;lt;code&amp;gt;ObjectValue&amp;lt;Player&amp;gt;&amp;lt;/code&amp;gt;, otherwise returns &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.get_player_by_username(v.player_name)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;data(): VariableStruct&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Returns the &amp;lt;code&amp;gt;VariableStruct&amp;lt;/code&amp;gt; representing &amp;lt;code&amp;gt;MoLangDataStoreFactory&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.data()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;save_data(): Double&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|Saves the &amp;lt;code&amp;gt;MoLangDataStoreFactory&amp;lt;/code&amp;gt; and returns &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;kotlin&amp;quot;&amp;gt;v.server.save_data()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>JPAKx4</name></author>
	</entry>
</feed>