add mcstatus api

This commit is contained in:
cobblesteve-dev 2024-06-02 14:27:00 -05:00
commit 470bf9018c
3 changed files with 173 additions and 391 deletions

View file

@ -216,4 +216,14 @@ ul {
text-align: center;
transition: background-color 0.3s ease;
border-radius: 10px;
}
.status.online span {
color: green;
}
.status.offline span {
color: red;
}
.status.unknown span {
color: orange;
}

File diff suppressed because one or more lines are too long

View file

@ -21,13 +21,13 @@
</ul>
<h1 align="center" style="font-size: 54px; margin-bottom: -10px; text-decoration: none">1.8 Servers</h1>
<p align="center">Have fun! Statuses updated weekly.</p>
<p align="center">Have fun! Thanks mcstatus.io for updating statuses.</p>
<br><br>
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="3b8d44b5-dbfb-4cf9-b4da-03d056d9f632-00-6rwn7z7ag2xt.picard.replit.dev">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Play SMP</h1>
<p style="font-size: 17px;">Survival, Skywars, Duels</p>
<a class="status">Status: <span class="online">Online</span></a>
@ -37,17 +37,17 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="zentic.cc">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Zentic</h1>
<p style="font-size: 17px;">Practice, Skywars, Bedwars</p>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<a class="copyLink" data-link="wss://zentic.cc"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
<a class="copyLink" data-link="zentic.cc"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="mc.arch.lol">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">ArchMC</h1>
<p style="font-size: 17px;">Survival, Bedwars, KitPVP</p>
<a class="status">Status: <span class="online">Online</span></a>
@ -57,7 +57,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="play.aeon-network.net">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Aeon Network</h1>
<p style="font-size: 17px;">Survival, Pitfall, Practice</p>
<a class="status">Status: <span class="offline">Offline</span></a>
@ -71,7 +71,7 @@
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="legxndsmp.minecraft.pe">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">LegendSMP</h1>
<p style="font-size: 17px;">Survival</p>
<a class="status">Status: <span class="offline">Offline</span></a>
@ -81,7 +81,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="helltech.cc">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Helltech</h1>
<p style="font-size: 17px;">GGsmp, LostSMP, Chess</p>
<a class="status">Status: <span class="online">Online</span></a>
@ -91,7 +91,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="java.clever-teaching.com">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Clever</h1>
<p style="font-size: 17px;">Survival, Skyblock, Minigames, and more</p>
<a class="status">Status: <span class="online">Online</span></a>
@ -101,7 +101,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="ricejava-neutine.net">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Rice Network</h1>
<p style="font-size: 17px;">Crystal PVP, Duels, Survival, Minigames</p>
<a class="status">Status: <span class="offline">Offline</span></a>
@ -115,7 +115,7 @@
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="asianf4rmer.minecraft.pe">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Asian SMP</h1>
<p style="font-size: 17px;">Survival</p>
<a class="status">Status: <span class="online">Online</span></a>
@ -125,8 +125,8 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Verise</h1>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="play.verise.xyz">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Verise Anarchy</h1>
<p style="font-size: 17px;">Anarchy</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
@ -135,7 +135,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="pvpclub.xyz">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">PVP Club</h1>
<p style="font-size: 17px;">Survival, PVP, Crystal FFA</p>
<a class="status">Status: <span class="offline">Offline</span></a>
@ -145,7 +145,7 @@
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="intelle.cloud/">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Rosalia</h1>
<p style="font-size: 17px;">Survival, Slime Fun</p>
<a class="status">Status: <span class="unknown">Unknown</span></a>
@ -157,6 +157,118 @@
</div>
</div>
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="java.craftclue.rocks">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Craftclue</h1>
<p style="font-size: 17px;">Anarchy</p>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<a class="copyLink" data-link="wss://play.craftclue.rocks"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="mc.asspixel.net">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">A--Pixel</h1>
<p style="font-size: 17px;">Minigames</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
<a class="copyLink" data-link="wss://mc.asspixel.net"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="reading-gs.q13x.com">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">q13x</h1>
<p style="font-size: 17px;">Anarchy</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
<a class="copyLink" data-link="wss://reading-gs.q13x.com"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="sus.shhnowisnottheti.me">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Creacraft</h1>
<p style="font-size: 17px;">Survival, Admin, Creative</p>
<a class="status">Status: <span class="unknown">Unknown</span></a>
<br><br>
<a class="copyLink" data-link="wss://sus.shhnowisnottheti.me"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
</div>
</div>
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="ep.rufan.tech">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Time Legacy</h1>
<p style="font-size: 17px;">Skyblock</p>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<a class="copyLink" data-link="wss://ep.rufan.tech"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="x.mess.eu.org/">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Messcraft</h1>
<p style="font-size: 17px;">Survival</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
<a class="copyLink" data-link="wss://x.mess.eu.org/"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="mcus1.dxomg.link">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Dxomg Proxy</h1>
<p style="font-size: 17px;">Proxy for cracked Java servers</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
<a class="copyLink" data-link="wss://mcus1.dxomg.link"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="mc.gmod9.com">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Gmod9 Anarchy</h1>
<p style="font-size: 17px;">Anarchy</p>
<a class="status">Status: <span class="unknown">Unknown</span></a>
<br><br>
<a class="copyLink" data-link="wss://mc.gmod9.com/wssconnect"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
</div>
</div>
<div class="button-container">
<div class="container">
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="mc.zyth.me">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Zyth MC</h1>
<p style="font-size: 17px;">Bedwars</p>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<a class="copyLink" data-link="wss://mc.zyth.me"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 275px; margin-left: 10px; margin-right: 10px;" data-server="proxy.theludos.com/">
<h1 style="margin-bottom: -7px; margin-top: 5px; font-size: 30px;">Ludos Proxy</h1>
<p style="font-size: 17px;">Proxy for cracked Java servers</p>
<a class="status">Status: <span class="offline">Offline</span></a>
<br><br>
<a class="copyLink" data-link="wss://proxy.theludos.com/"><span class="material-icons-round" style="vertical-align: -3px; scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
</div>
</div>
<script>
// Function to copy text to clipboard
function copyToClipboard(text) {
@ -180,5 +292,41 @@
});
</script>
<script>
// Function to update server status
function updateServerStatus(serverAddress, statusElement) {
// Make a request to the mcstatus.io API
fetch(`https://api.mcstatus.io/v2/status/java/${serverAddress}`)
.then(response => response.json())
.then(data => {
// Check if the server is online
if (data.online) {
statusElement.innerHTML = `Status: <span class="online">Online</span>`;
} else {
statusElement.innerHTML = `Status: <span class="offline">Offline</span>`;
}
})
.catch(error => {
console.error('Error fetching server status:', error);
statusElement.innerHTML = `Status: <span class="unknown">Unknown</span>`;
});
}
// Get all buttons with class 'button'
const buttons = document.querySelectorAll('.button');
// Loop through each button and attach event listener
buttons.forEach(button => {
const serverAddress = button.dataset.server;
const statusElement = button.querySelector('.status');
// Update status on button click
button.addEventListener('click', () => {
updateServerStatus(serverAddress, statusElement);
});
// Initial status check
updateServerStatus(serverAddress, statusElement);
});
</script>
</body>
</html>