added live server status
This commit is contained in:
parent
95d3383c1a
commit
2a398d20cf
20
index.md
20
index.md
|
@ -2,10 +2,14 @@
|
|||
layout: default
|
||||
---
|
||||
|
||||
<script src="https://mcapi.us/scripts/minecraft.js"></script>
|
||||
|
||||
Hello, i'm a private [Minecraft](https://minecraft.net) server. Currently i'm running the popular [Agrarian Skies 2](http://minecraft.curseforge.com/projects/agrarian-skies-2) pack by [jadedcat](http://minecraft.curseforge.com/members/jadedcat).
|
||||
|
||||
### News
|
||||
<pre>
|
||||
Jun/10th/2016: live server status has been added to this page.
|
||||
Jun/8th/2016: now there is three of us.
|
||||
Jun/5th/2016: first player online.
|
||||
Jun/4th/2016: falcon.socialnerds.org is is born. no players yet.
|
||||
Jun/3rd/2016: falcon.socialnerds.org is down for birth. stay tuned.
|
||||
|
@ -14,6 +18,22 @@ Jun/3rd/2016: falcon.socialnerds.org is down for birth. stay tuned.
|
|||
### Server
|
||||
host: `falcon.socialnerds.org`
|
||||
port: `25565`
|
||||
status: <code class="highlighter-rouge"><span class="server-online"></span></code>
|
||||
online players: <code class="highlighter-rouge"><span class="server-players"></span></code>
|
||||
|
||||
|
||||
<script>
|
||||
MinecraftAPI.getServerStatus('falcon.socialnerds.org', {
|
||||
port: 25565
|
||||
}, function (err, status) {
|
||||
if (err) {
|
||||
return document.querySelector('.server-status').innerHTML = 'Error loading status';
|
||||
}
|
||||
|
||||
document.querySelector('.server-online').innerHTML = status.online ? 'server online' : 'server offline';
|
||||
document.querySelector('.server-players').innerHTML = status.online ? status.players.now + '/' + status.players.max : 'server offline';
|
||||
});
|
||||
</script>
|
||||
|
||||
### Join the game
|
||||
Download and install [MultiMC](http://multimc.org/#Download%20&%20Install). MultiMC is a Minecraft launcher which can start custom Minecraft instances. Download the AS2 [client files](http://minecraft.curseforge.com/projects/agrarian-skies-2/files/2261684/download) and import them into a new MultiMC instance(Minecraft v1.7.10 + Forge 10.13.4).
|
||||
|
|
Reference in New Issue