first commit

This commit is contained in:
Your Name 2025-02-27 10:34:17 +02:00
commit eac573c682
26 changed files with 1262 additions and 0 deletions

13
website/src/app.d.ts vendored Normal file
View file

@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

15
website/src/app.html Normal file
View file

@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
<style>
</style>
</html>

27
website/src/lib/client.ts Normal file
View file

@ -0,0 +1,27 @@
import { dev } from "$app/environment"
export class Client {
private static async sendRequest(path: string) {
let endpoint;
if(dev) {
endpoint = "http://localhost:3000/"
} else {
endpoint = "https://api.slop.live/"
}
const req = await fetch(endpoint + path)
return await req.json()
}
static async tps() {
return await this.sendRequest("api/getTps")
}
static async players() {
return await this.sendRequest("api/getPlayersOnline")
}
static async uptime() {
return await this.sendRequest("api/uptime")
}
static async whitelist(): Promise<string[]> {
return await this.sendRequest("api/whitelist")
}
}

38
website/src/lib/index.ts Normal file
View file

@ -0,0 +1,38 @@
// place files you want to import through the `$lib` alias in this folder.
export const mods = `[audioplayer] audioplayer-fabric-1.21.4-1.13.2.jar
[carpet-tis-addition] carpet-tis-addition-v1.65.0-mc1.21.4.jar
[chunky] Chunky-Fabric-1.4.27.jar
[cloth-config] cloth-config-17.0.144-fabric.jar
[collective] collective-1.21.4-7.89.jar
[dcintegration] dcintegration-fabric-MC1.21.3-3.1.0.1.jar
[easy-elevators] easyelevators-1.21.4-1.2.jar
[fabric-api] fabric-api-0.114.0+1.21.4.jar
[fabric-language-kotlin] fabric-language-kotlin-1.13.0+kotlin.2.1.0.jar
[fabricproxy-lite] FabricProxy-Lite-2.9.0.jar
[ferrite-core] ferritecore-7.1.1-fabric.jar
[forge-config-api-port] ForgeConfigAPIPort-v21.4.1-1.21.4-Fabric.jar
[htm] htm-1.1.15.jar
[just-player-heads] justplayerheads-1.21.4-4.1.jar
[krypton] krypton-0.2.8.jar
[lithium] lithium-fabric-0.14.3+mc1.21.4.jar
[luckperms] LuckPerms-Fabric-5.4.150.jar
[modernfix] modernfix-fabric-5.20.1+mc1.21.4.jar
[mods-command] mods-command-mc1.21.4-1.1.9.jar
[nullscape] Nullscape_1.21.x_v1.2.10.jar
[ouch] ouch-1.3.1+1.21.4.jar
[pl3xmap] Pl3xMap-1.21.4-520.jar
[polydex] polydex-1.4.0+1.21.4-rc3.jar
[simple-voice-chat] voicechat-fabric-1.21.4-2.5.27.jar
[spark] spark-1.10.121-fabric.jar
[terralith] Terralith_1.21.x_v2.5.7.jar
[tt20] tt20-0.7.1+mc1.21.2.jar
[universal-graves] graves-3.6.0+1.21.4.jar
[vmp-fabric] vmp-fabric-mc1.21.4-0.2.0+beta.7.187-all.jar
[worldedit] worldedit-mod-7.3.10-beta-01.jar
carpet-extra-1.21.4-1.4.161.jar
fabric-carpet-1.21.4-1.4.161+v241203.jar
fabricexporter-1.0.14.jar
fuji-6.3.0-4ad808f4ae-mc1.21.4.jar
NoChatReports-FABRIC-1.21.4-v2.11.0.jar
reply-1.0.0.jar
servux-fabric-1.21.4-0.5.1.jar`.split("\n");

View file

@ -0,0 +1,2 @@
export const ssr = false;
export const prerender = true;

View file

@ -0,0 +1,203 @@
<script>
import { mods } from "$lib";
import { Client } from "$lib/client";
import { onDestroy, onMount } from "svelte";
import ms from "ms";
let players = $state(0);
let tps = $state(0);
let uptime = $state("900 years");
/**
* @type {string[]}
*/
let whitelist = $state([]);
let loading = $state(true);
let interval = 0;
async function getInfo() {
players = await Client.players();
tps = await Client.tps();
uptime = ms(await Client.uptime(), { long: true });
whitelist = await Client.whitelist();
loading = false;
}
onMount(() => {
getInfo();
interval = setInterval(() => {
getInfo();
}, 10000);
});
onDestroy(() => {
clearInterval(interval);
});
</script>
<div class="container">
{#if loading}
<h1>loading...</h1>
<img src="loading.gif" width="256" alt="loading" />
{:else}
<h1>Slop Minecraft Server</h1>
<div class="info">
<div class="border">
<h2>current info</h2>
<div>
<ul>
<li>players: <code>{players}</code></li>
<li>tps: <code>{tps.toFixed(2)}</code></li>
<li>uptime: <code>{uptime}</code></li>
</ul>
this server is heavily whitelisted; to join
<ol>
<li>find someone to give you a invite to the discord server</li>
<li>join the server</li>
<li>send your username in <u>#igns</u> (this server is not cracked)</li>
</ol>
</div>
</div>
<div class="border">
<h2>info</h2>
<div>
<div>
<p>The SMP uses the following datapacks: <code>Terralith, Nullscape, Blaze and Caves Advancements pack, Invisible Item Frames, Copper Boosted Rails</code>.</p>
<p>We also have several server-side mods which you can view using /mods. <strong>You do not need any mods to join, you can play on a vanilla client</strong>. Most of them provide certain commands or aid in performance:</p>
<ul>
<li>There is a chest locking mod to prevent stealing, <code>/htm set private</code> to lock a chest.</li>
<li>There is a graves mod, graves do not despawn. This is to prevent accidentally losing items.</li>
</ul>
<p>Using client-side optimization mods is completely fine. Most client side mods that do not alter game mechanics and do not give an advantage are fine. If you're unsure about if a certain mod is allowed, feel free to ask a staff member. Xaero's world map is only allowed if you use the fair-play version.</p>
<p>We have a world map at <a href="https://map.slop.live/">https://map.slop.live/</a>. Use <code>/map hide</code> or <code>/map show</code> to hide or show yourself.</p>
<p> Server chat can be viewed in <u>#gateway</u>, you can send discord messages and people on the server will see them too.</p>
</div>
</div>
</div>
<div class="border">
<h2>rules</h2>
<div>
<ol>
<li>Do not hack; Do not use mods that provide considerable unfair advantages<br>
- What is a considerable unfair advantage? A considerable unfair advantage is anything that gives you a large edge, ability, greatly speeds up, etc. over other players using means that are not possible within vanilla Minecraft.
</li>
<li>
Do not grief, steal, and do not use other people's farms, builds and creations without their explicit permission prior to your use.
</li>
<li>
Do not use alts.
</li>
<li>
Use common sense.<br>
- Do not be an asshole to other people, treat others with respect. Starting unnecessary drama falls into this.
</li>
<li>
The seed is not publicly available and using it to find structures, biomes, or anything else is not allowed. Please do NOT use it. The server map exists for this.
</li>
</ol>
This is a decently small SMP so we'll give people the benefit of the doubt when possible, we can make certain exceptions, but please do not try to find loopholes. <u>TL;DR: Don't hack, don't steal, use common sense and be nice.</u></div>
</div>
<div class="border">
<h2>info</h2>
<div>
<h3>Mods</h3>
<ul class="mods">
{#each mods as mod}
<li>{mod}</li>
{/each}
</ul>
<h3>Players</h3>
<ul class="mods">
{#each whitelist as player}
<li>{player}</li>
{/each}
</ul>
<button onclick={() => {
location.href = "https://sad.ovh"
}}>sad.ovh</button>
<button onclick={() => {
location.href = "https://panel.sad.ovh"
}}>panel</button>
<button onclick={() => {
location.href = "https://map.slop.live"
}}>map</button>
</div>
</div>
</div>
{/if}
</div>
<style>
@font-face {
font-family: "myfont";
src: url("Myfont-Regular.ttf");
}
.container {
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
flex-direction: column;
}
.info {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 10px;
}
.info > * {
padding: 20px;
flex-basis: 100%;
}
.mods {
overflow-y: scroll;
height: 200px;
}
h1,
h2,
h3 {
font-family: "myfont";
}
button {
border: 2px solid #000;
border-radius: 255px 15px 255px 15px / 15px 255px 15px 255px;
font-family: "myfont";
}
.border {
border: 1px solid #000;
border-radius: 255px 15px 255px 15px / 15px 255px 15px 255px;
}
.mods::-webkit-scrollbar {
width: 12px;
}
.mods::-webkit-scrollbar-track {
background: white;
border: 2px solid black;
}
.mods::-webkit-scrollbar-thumb {
background: black;
border: 2px solid white;
}
.mods::-webkit-scrollbar-thumb:hover {
background: #555;
}
@media (max-width: 400px) {
.border {
border: none;
}
h1 {
font-size: 20px;
}
.info {
gap: 2px;
}
.info > * {
padding: 15px;
}
}
</style>