<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>https://zedwork.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Datapack%3ASleep_notify</id>
		<title>Datapack:Sleep notify - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://zedwork.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Datapack%3ASleep_notify"/>
		<link rel="alternate" type="text/html" href="https://zedwork.co.uk/w/index.php?title=Datapack:Sleep_notify&amp;action=history"/>
		<updated>2026-04-19T01:43:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://zedwork.co.uk/w/index.php?title=Datapack:Sleep_notify&amp;diff=1616&amp;oldid=prev</id>
		<title>Zedwick: Removed download section</title>
		<link rel="alternate" type="text/html" href="https://zedwork.co.uk/w/index.php?title=Datapack:Sleep_notify&amp;diff=1616&amp;oldid=prev"/>
				<updated>2018-08-04T01:31:13Z</updated>
		
		<summary type="html">&lt;p&gt;Removed download section&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en-GB'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:31, 4 August 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Shows how many players are currently sleeping&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Shows how many players are currently sleeping&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Download ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Files ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Files ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zedwick</name></author>	</entry>

	<entry>
		<id>https://zedwork.co.uk/w/index.php?title=Datapack:Sleep_notify&amp;diff=1615&amp;oldid=prev</id>
		<title>Zedwick: Created page with &quot;Shows how many players are currently sleeping  == Download ==    == Files ==  === sleep_notify/pack.mcmeta === &lt;pre&gt; {     &quot;pack&quot;: {         &quot;pack_format&quot;: 1,         &quot;descrip...&quot;</title>
		<link rel="alternate" type="text/html" href="https://zedwork.co.uk/w/index.php?title=Datapack:Sleep_notify&amp;diff=1615&amp;oldid=prev"/>
				<updated>2018-08-04T01:28:19Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Shows how many players are currently sleeping  == Download ==    == Files ==  === sleep_notify/pack.mcmeta === &amp;lt;pre&amp;gt; {     &amp;quot;pack&amp;quot;: {         &amp;quot;pack_format&amp;quot;: 1,         &amp;quot;descrip...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Shows how many players are currently sleeping&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/pack.mcmeta ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;pack&amp;quot;: {&lt;br /&gt;
        &amp;quot;pack_format&amp;quot;: 1,&lt;br /&gt;
        &amp;quot;description&amp;quot;: &amp;quot;Shows how many players are currently sleeping&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/data/minecraft/tags/functions/load.json ===&lt;br /&gt;
Specifies the setup mcfunction to be ran on server load (or reload)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;replace&amp;quot;: &amp;quot;false&amp;quot;,&lt;br /&gt;
    &amp;quot;values&amp;quot;: [&lt;br /&gt;
        &amp;quot;sleep_notify:setup&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/data/minecraft/tags/functions/tick.json ===&lt;br /&gt;
Specifies the root mcfunction to be ran every tick&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;replace&amp;quot;: &amp;quot;false&amp;quot;,&lt;br /&gt;
    &amp;quot;values&amp;quot;: [&lt;br /&gt;
        &amp;quot;sleep_notify:root&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/data/sleep_notify/functions/root.mcfunction ===&lt;br /&gt;
The root mcfunction, this is ran every tick (as specified in the tick.json file).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#function sleep_notify/root&lt;br /&gt;
execute if entity @a[nbt={Sleeping:1b}] run function sleep_notify:notify&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/data/sleep_notify/functions/notify.mcfunction ===&lt;br /&gt;
The notify mcfunction is only ran if one or more players are currently sleeping.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#function sleep_notify/notify&lt;br /&gt;
scoreboard players reset * sleep_notify&lt;br /&gt;
execute as @a run scoreboard players add online sleep_notify 1&lt;br /&gt;
execute as @a[nbt={Sleeping:1b}] run scoreboard players add sleeping sleep_notify 1&lt;br /&gt;
title @a actionbar {&amp;quot;text&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;extra&amp;quot;:[{&amp;quot;score&amp;quot;:{&amp;quot;name&amp;quot;:&amp;quot;sleeping&amp;quot;,&amp;quot;objective&amp;quot;:&amp;quot;sleep_notify&amp;quot;},&amp;quot;color&amp;quot;:&amp;quot;aqua&amp;quot;},{&amp;quot;text&amp;quot;:&amp;quot;/&amp;quot;,&amp;quot;color&amp;quot;:&amp;quot;gray&amp;quot;},{&amp;quot;score&amp;quot;:{&amp;quot;name&amp;quot;:&amp;quot;online&amp;quot;,&amp;quot;objective&amp;quot;:&amp;quot;sleep_notify&amp;quot;},&amp;quot;color&amp;quot;:&amp;quot;dark_aqua&amp;quot;},{&amp;quot;text&amp;quot;:&amp;quot; players are sleeping&amp;quot;,&amp;quot;color&amp;quot;:&amp;quot;gray&amp;quot;}]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sleep_notify/data/sleep_notify/functions/setup.mcfunction ===&lt;br /&gt;
The setup mcfunction adds the scoreboard objective required for tracking sleeping players. This is ran on server start and reload, as specified in load.json.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#function sleep_notify/setup&lt;br /&gt;
scoreboard objectives add sleep_notify dummy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zedwick</name></author>	</entry>

	</feed>