\ No newline at end of file
diff --git a/src/components/moderator/pages/players/columns.ts b/src/components/moderator/pages/players/columns.ts
index 2e8cb85..bbac55e 100644
--- a/src/components/moderator/pages/players/columns.ts
+++ b/src/components/moderator/pages/players/columns.ts
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-import type {ColumnDef} from "@tanstack/table-core";
-import type {Player} from "@type/data.ts";
+import type { ColumnDef } from "@tanstack/table-core";
+import type { Player } from "@type/data.ts";
import { renderComponent } from "@components/ui/data-table";
import PermissionsDropdown from "@components/moderator/pages/players/PermissionsDropdown.svelte";
import PrefixDropdown from "@components/moderator/pages/players/PrefixDropdown.svelte";
@@ -36,25 +36,20 @@ export const columns: ColumnDef = [
accessorKey: "prefix",
header: "Prefix",
cell: ({ row }) => {
- return renderComponent(
- PrefixDropdown, {
- prefix: row.getValue("prefix"),
- uuid: row.getValue("uuid"),
- },
- );
+ return renderComponent(PrefixDropdown, {
+ prefix: row.getValue("prefix"),
+ uuid: row.getValue("uuid"),
+ });
},
},
{
accessorKey: "perms",
header: "Permissions",
cell: ({ row }) => {
- return renderComponent(
- PermissionsDropdown,
- {
- perms: row.getValue("perms"),
- uuid: row.getValue("uuid"),
- },
- );
+ return renderComponent(PermissionsDropdown, {
+ perms: row.getValue("perms"),
+ uuid: row.getValue("uuid"),
+ });
},
},
-];
\ No newline at end of file
+];
diff --git a/src/components/repo/auditlog.ts b/src/components/repo/auditlog.ts
new file mode 100644
index 0000000..2499585
--- /dev/null
+++ b/src/components/repo/auditlog.ts
@@ -0,0 +1,40 @@
+import { derived } from "svelte/store";
+import { fetchWithToken, tokenStore } from "./repo";
+import { PagedAutidLogSchema } from "@components/types/auditlog";
+
+export class AuditLogRepo {
+ async get(
+ actionText: string | undefined,
+ serverText: string | undefined,
+ fullText: string | undefined,
+ actor: number[] | undefined,
+ actionType: string[] | undefined,
+ timeFrom: number | undefined,
+ timeTo: number | undefined,
+ serverOwner: number[] | undefined,
+ velocity: boolean | undefined,
+ page: number,
+ pageSize: number,
+ sorting: string | undefined
+ ) {
+ const params = new URLSearchParams();
+ if (actionText) params.append("actionText", actionText);
+ if (serverText) params.append("serverText", serverText);
+ if (fullText) params.append("fullText", fullText);
+ if (actor) actor.forEach((a) => params.append("actor", a.toString()));
+ if (actionType) actionType.forEach((a) => params.append("actionType", a));
+ if (timeFrom) params.append("timeGreater", timeFrom.toString());
+ if (timeTo) params.append("timeLess", timeTo.toString());
+ if (serverOwner) serverOwner.forEach((s) => params.append("serverOwner", s.toString()));
+ if (velocity !== undefined) params.append("velocity", velocity.toString());
+ params.append("page", page.toString());
+ params.append("limit", pageSize.toString());
+ if (sorting) params.append("sorting", sorting);
+
+ return await fetchWithToken("", `/auditlog?${params.toString()}`)
+ .then((value) => value.json())
+ .then((data) => PagedAutidLogSchema.parse(data));
+ }
+}
+
+export const auditLog = derived(tokenStore, ($token) => new AuditLogRepo());
diff --git a/src/components/repo/data.ts b/src/components/repo/data.ts
index b6a87db..44cf672 100644
--- a/src/components/repo/data.ts
+++ b/src/components/repo/data.ts
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-import type { Player, Server } from "@type/data.ts";
-import { PlayerSchema, ServerSchema } from "@type/data.ts";
+import type { Player, PlayerList, Server } from "@type/data.ts";
+import { PlayerListSchema, PlayerSchema, ServerSchema } from "@type/data.ts";
import { fetchWithToken, tokenStore } from "./repo.ts";
import { derived, get } from "svelte/store";
import { TeamSchema, type Team } from "@components/types/team.ts";
@@ -38,10 +38,28 @@ export class DataRepo {
.then(PlayerSchema.parse);
}
- public async getPlayers(): Promise {
- return await fetchWithToken(get(tokenStore), "/data/admin/users")
+ public async queryPlayers(
+ name: string | undefined,
+ uuid: string | undefined,
+ team: number[] | undefined,
+ limit: number | undefined,
+ page: number | undefined,
+ includePerms: boolean | undefined,
+ includeId: boolean | undefined
+ ): Promise {
+ let query = new URLSearchParams();
+
+ if (name) query.append("name", name);
+ if (uuid) query.append("uuid", uuid);
+ if (team) team.forEach((t) => query.append("team", t.toString()));
+ if (limit) query.append("limit", limit.toString());
+ if (page) query.append("page", page.toString());
+ if (includePerms !== undefined) query.append("includePerms", includePerms.toString());
+ if (includeId !== undefined) query.append("includeId", includeId.toString());
+
+ return await fetchWithToken(this.token, "/data/admin/users?" + query.toString())
.then((value) => value.json())
- .then(PlayerSchema.array().parse);
+ .then(PlayerListSchema.parse);
}
public async getTeams(): Promise {
diff --git a/src/components/stores/stores.ts b/src/components/stores/stores.ts
index 0afaf52..0ca1faf 100644
--- a/src/components/stores/stores.ts
+++ b/src/components/stores/stores.ts
@@ -31,10 +31,6 @@ import { permsRepo } from "@repo/perms.ts";
export const schemTypes = cached([], () => fetchWithToken(get(tokenStore), "/data/admin/schematicTypes").then((res) => res.json()));
-export const players = cached([], async () => {
- return get(dataRepo).getPlayers();
-});
-
export const teams = cached([], async () => {
return get(dataRepo).getTeams();
});
diff --git a/src/components/types/auditlog.ts b/src/components/types/auditlog.ts
new file mode 100644
index 0000000..d956980
--- /dev/null
+++ b/src/components/types/auditlog.ts
@@ -0,0 +1,19 @@
+import { z } from "zod";
+
+export const AuditLogEntrySchema = z.object({
+ id: z.number(),
+ time: z.number(),
+ server: z.string(),
+ serverOwner: z.string().nullable(),
+ actor: z.string(),
+ actionType: z.enum(["JOIN", "LEAVE", "COMMAND", "SENSITIVE_COMMAND", "CHAT", "GUI_OPEN", "GUI_CLOSE", "GUI_CLICK"]),
+ actionText: z.string(),
+});
+
+export const PagedAutidLogSchema = z.object({
+ entries: z.array(AuditLogEntrySchema),
+ rows: z.number(),
+});
+
+export type AuditLogEntry = z.infer;
+export type PagedAuditLog = z.infer;
diff --git a/src/components/types/data.ts b/src/components/types/data.ts
index 2098b68..3eee428 100644
--- a/src/components/types/data.ts
+++ b/src/components/types/data.ts
@@ -29,12 +29,20 @@ export type SchematicType = z.infer;
export const PlayerSchema = z.object({
name: z.string(),
uuid: z.string(),
- prefix: z.string(),
- perms: z.array(z.string()),
+ prefix: z.string().nullable(),
+ perms: z.array(z.string()).nullable(),
+ id: z.number().nullable(),
});
export type Player = z.infer;
+export const PlayerListSchema = z.object({
+ entries: z.array(PlayerSchema),
+ rows: z.number(),
+});
+
+export type PlayerList = z.infer;
+
export const ServerSchema = z.object({
description: z.any(),
players: z.object({
diff --git a/src/components/ui/PlayerSelector.svelte b/src/components/ui/PlayerSelector.svelte
new file mode 100644
index 0000000..e47db2b
--- /dev/null
+++ b/src/components/ui/PlayerSelector.svelte
@@ -0,0 +1,122 @@
+
+
+
+
+ {#snippet child({ props })}
+
+ {/snippet}
+
+
+
+
+
+ No players found.
+
+ {#each players as player (player.uuid)}
+ handleSelect(player)}>
+
+ {player.name}
+
+ {/each}
+
+
+
+
+
diff --git a/src/content/events/neujahr2026.md b/src/content/events/neujahr2026.md
index 354918c..997e3c6 100644
--- a/src/content/events/neujahr2026.md
+++ b/src/content/events/neujahr2026.md
@@ -21,7 +21,7 @@ es ist wieder Zeit, das Jahr neigt sich dem Ende und damit ist es wieder Zeit f
- Maße: **13x13x13**
- Freiluftbrücken erlaubt
-- Version 1.20
+- Version 1.21
- Jedes Team darf nur eine schematic einsenden.
- Alle Eventschematics werden nach dem Event zu MiniWarGears
@@ -29,7 +29,7 @@ es ist wieder Zeit, das Jahr neigt sich dem Ende und damit ist es wieder Zeit f
- Techhider wird aktiv sein
- Kampfleiter darf zum Schuss auffordern
- Auto Tech KO wird deaktiviert
-- Es wir ein eigenen Schemtypen geben
+- Es wird ein eigenen Schemtypen geben
- Turniersystem: All vs All
**Eventleiter:** AdmiralSeekrank
diff --git a/src/content/rules/en/megawargear.md b/src/content/rules/en/megawargear.md
new file mode 100644
index 0000000..c4d51e8
--- /dev/null
+++ b/src/content/rules/en/megawargear.md
@@ -0,0 +1,11 @@
+---
+translationKey: megawg
+---
+
+# MegaWarGear Ruleset
+
+For technical reasons MegaWarGear-Fights are held in version 1.12.2.
+MegaWarGears provide the opportunity to build without limitations.
+An elaborate design with defined shape is mandatory though (you may not just build some cube).
+Besides the lack of limitations regarding dimensions and amounts, MegaWarGears are supposed to be similar to regular WarGears, in that endstone is the most resistant armoring block, dispensers should not contain TNT, etc.
+Since this game-mode is not meant for serious competition, an approved MegaWarGear should be fine to release as a public.
\ No newline at end of file
diff --git a/src/content/rules/en/microwargear.md b/src/content/rules/en/microwargear.md
new file mode 100644
index 0000000..a3cd287
--- /dev/null
+++ b/src/content/rules/en/microwargear.md
@@ -0,0 +1,135 @@
+---
+translationKey: microwg
+---
+
+# MicroWarGear Ruleset
+
+MicroWargears are constructed in version 1.20.
+
+## Dimensions
+
+Max. 7 blocks deep
+Max. 7 blocks wide
+Max. 7 block high
+
+A MicroWarGear may extend at most 7 blocks into every direction.
+Shield related technology may be activated from any place within the MicroWarGear.
+
+## Materials
+
+Blocks used in MicroWarGear construction must not exceed a blast resistance of 9.
+Inventory blocks must not contain items other than flowers, honey bottles and horse armor.
+Chests, shulker boxes and barrels may contain TNT.
+Dispensers may only individually contain either one stack of fire charges or one stack of basic arrows.
+No more than 8 dispensers may be installed.
+
+The following materials may not be used for construction: all saplings, minecraft:ice, nether portals, lava, waterlogged leaves and roots, TNT (pre-installed), any non-block entities.
+Water may only be used within cannons and only to prevent damaging your gear.
+
+## Cannons
+
+Every MicroWarGear must have at least one functioning cannon.
+A cannon is a continuous redstone contraption which is able to damage the opponent using primed TNT.
+A TNT-cannon is the only place within a MicroWarGear where water may be placed and only if it does not leave the cannon or form water-shields.
+Furthermore a cannon may not intentionally damage itself.
+A cannon may at most shoot 8 projectiles at once.
+Additionally, a single main-cannon can be installed, which may shoot up to 12 projectiles.
+
+## Command Bridge
+
+A MicroWarGear must contain a command bridge, either in the form of a clearly distinguishable room, open air command bridge or crawlspace command bridge.
+The command bridge must be separated from the rest of the MicroWarGear by doors, fence gates, trapdoors or pistons.
+
+A command bridge must adhere to the following conditions:
+- At least 25 m² (1 block = 1 meter)
+- A window through which the opponent is visible directly (not required for open air command bridges)
+- Controls for at least 2 headlights that are visible from the opponent's position
+- These controls must save their state until manually activated again
+- The command bridge must be the only place where dispensers may be activated, which aim at the opponent
+
+## Design
+
+MicroWarGears must have a visual design.
+The outermost layer of a MicroWarGear must have a blast resistance of at most 6.
+It is expected that there is a continuous design structure across the entire front of the MicroWarGear.
+At least 2 different kinds of blocks must be used in a design (not counting redstone components).
+A "continuous design structure" means, that no substantial surface areas have too little or no depth to them.
+Depth variation may also be achieved using walls or stairs.
+
+## Bug-Using
+
+The duplication of any blocks or entities is forbidden.
+Excessive use of blocks that are replaced by the tech hider is also forbidden.
+
+## Definitions
+
+### Projectile
+
+A projectile is any primed TNT entity, which leaves the extension limits of a MicroWarGear (7 blocks) towards the opponent.
+
+### Propellant
+
+A propellant is any primed TNT entity, which by exploding accellerates projectiles towards the opponent.
+The propellant of any one cannon must only affect projectiles of that same cannon.
+
+## Hidden Blocks (Replaced with Endstone)
+
+- WATER
+- NOTE_BLOCK
+- POWERED_RAIL
+- DETECTOR_RAIL
+- PISTON
+- PISTON_HEAD
+- STICKY_PISTON
+- TNT
+- CHEST
+- TRAPPED_CHEST
+- REDSTONE_WIRE
+- STONE_PRESSURE_PLATE
+- IRON_DOOR
+- OAK_PRESSURE_PLATE
+- SPRUCE_PRESSURE_PLATE
+- BIRCH_PRESSURE_PLATE
+- JUNGLE_PRESSURE_PLATE
+- ACACIA_PRESSURE_PLATE
+- DARK_OAK_PRESSURE_PLATE
+- REDSTONE_TORCH
+- REDSTONE_WALL_TORCH
+- REPEATER
+- BREWING_STAND
+- TRIPWIRE_HOOK
+- TRIPWIRE
+- HEAVY_WEIGHTED_PRESSURE_PLATE
+- LIGHT_WEIGHTED_PRESSURE_PLATE
+- COMPARATOR
+- REDSTONE_BLOCK
+- HOPPER
+- ACTIVATOR_RAIL
+- DROPPER
+- SLIME_BLOCK
+- OBSERVER
+- HONEY_BLOCK
+- LEVER
+- SCULK_SENSOR
+- POLISHED_BLACKSTONE_PRESSURE_PLATE
+- MANGROVE_PRESSURE_PLATE
+- CRIMSON_PRESSURE_PLATE
+- WARPED_PRESSURE_PLATE
+
+## The Contents of the Following Blocks Are Also Hidden
+
+- SIGN
+- DISPENSER
+- CHEST
+- TRAPPED_CHEST
+- FURNACE
+- BREWING_STAND
+- HOPPER
+- DROPPER
+- SHULKER_BOX
+- JUKEBOX
+- COMPARATOR
+
+
+
+Whether or not a MicroWarGear is rules compliant is up to the examiners.
diff --git a/src/content/rules/en/miniwargear.md b/src/content/rules/en/miniwargear.md
new file mode 100644
index 0000000..63379fe
--- /dev/null
+++ b/src/content/rules/en/miniwargear.md
@@ -0,0 +1,158 @@
+---
+translationKey: mwg
+mode: MiniWarGear
+---
+
+# MiniWarGear-Ruleset
+
+MiniWarGears are constructed in version 1.20.
+
+## Dimensions
+
+- Max. 20 blocks deep (+ 1 block for design on each side) (22)
+- Max. 35 blocks wide (+ 1 block for design on each side) (37)
+- Max. 26 blocks high
+
+A MiniWarGear may extend at most 7 blocks into every direction.
+All shield related technology may only be activated from within the command bridge.
+
+## Materials
+
+Blocks used for the construction of a MiniWarGear must not exceed a blast resistance of 9.
+A maximum of 120 TNT may be pre-installed.
+Inventory blocks must not contain items other than flowers, honey bottles or horse armor.
+Dispensers may only individually contain either one stack of fire charges or one stack of basic arrows.
+No more than 16 dispensers may be installed.
+
+The following materials may not be used for construction: all saplings, minecraft:ice, nether portals, lava, waterlogged leaves and roots, TNT (pre-installed), any non-block entities.
+Water may only be used within cannons and only to prevent damaging your gear.
+
+## Cannons
+
+A cannon is a continuous redstone contraption which is able to damage the opponent using primed TNT.
+A TNT-cannon is the only place within a MiniWarGear where water may be placed and only if it does not leave the cannon or form water-shields.
+Furthermore a cannon may not intentionally damage itself.
+A cannon may at most shoot 8 projectiles at once.
+Additionally, a single main-cannon can be installed, which may shoot up to 12 projectiles.
+The main-cannon must be a manual cannon.
+
+A MiniWarGear may be equipped with up to 9 cannons.
+It is forbidden to try to pass off multiple cannons as a single one.
+It is also forbidden to try to pass off a single cannon as multiple.
+Whether or not this is the case is up to the examiners and fight-judges.
+
+Manual cannons are TNT-cannons, which require manual loading.
+They may not be pre-loaded at the time of construction.
+Furthermore manual cannons may fire up to three individual times after being loaded once.
+All projectils of a manual cannon which is able to fire multiple times like this must be launched from the exact same launch-point.
+That launch-point is defined by the first shot of a salve the cannon performs.
+
+Automatic cannons are TNT-cannons which can fire at least 5 individual times, without being manually loaded.
+They must be pre-loaded at the time of construction.
+To qualify for being allowed to be pre-loaded the cannon must fire at least 5 times.
+All projectils of an automatic cannon must be launched from the exact same launch-point.
+The first 5 shots of an automatic cannon must have the exact same number of projectiles.
+After the 6th shot the amount of projectiles may decrease, and must not increase.
+Between individual shots of an automatic cannon must be at least 4 seconds of delay (40 redstone ticks, 80 game ticks).
+A MiniWarGear may be equipped with up to two automatic cannons.
+
+## Brücke
+
+A MiniWarGear must feature a command bridge in the form of a clearly distinguishable room.
+The command bridge must be separated from the rest of the MiniWarGear by doors, fence gates, trapdoors or pistons.
+
+A command bridge must adhere to the following conditions:
+
+- At least 25 m² (1 block = 1 meter)
+- A periodic, acoustic (note block / bell) and optical damage sensor
+- A window through which the opponent is visible directly
+- Controls for at least 4 headlights that are visible from the opposing position
+- Controls for automatic cannons (if any are installed)
+- Controls for shield technology (if there is any)
+- The command bridge is the only place where dispensers which aim at the opponent may be controlled
+
+## Design
+
+MiniWarGears must (besides at least one cannon) feature a visual design.
+The outermost layer of a MiniWarGear must only have a blast resistance of at most 6.
+It is expected that there is a continuous design structure across the entire front of a MiniWarGear.
+At least 2 different kinds of blocks must be used in a design (not counting redstone components).
+A "continuous design structure" means, that no substantial surface areas have little to no depth.
+Depth variation may also in part be achieved using walls or stairs, but this should not be overused.
+Whether or not this is the case is up to the examiner.
+
+## Bug-Using
+
+The creation of TNT in a MiniWarGear is forbidden.
+
+Excessive use of blocks which are hidden by the tech-hider is also forbidden.
+
+## Definitions
+
+### Projectile
+
+A Projectile is any primed TNT entity, which is accelerated by propellant.
+Furthermore a projectile is any primed TNT entity, which leaves the extension limits of a MiniWarGear (7 blocks) towards the opponent.
+
+### Propellant
+
+A propellant is any primed TNT entity, which by exploding accellerates projectiles towards the opposing half of the arena.
+The propellant of any one cannon must only affect projectiles of that same cannon.
+
+## Hidden Blocks (Replaced with Endstone)
+
+- WATER
+- NOTE_BLOCK
+- POWERED_RAIL
+- DETECTOR_RAIL
+- PISTON
+- PISTON_HEAD
+- STICKY_PISTON
+- TNT
+- CHEST
+- TRAPPED_CHEST
+- REDSTONE_WIRE
+- STONE_PRESSURE_PLATE
+- IRON_DOOR
+- OAK_PRESSURE_PLATE
+- SPRUCE_PRESSURE_PLATE
+- BIRCH_PRESSURE_PLATE
+- JUNGLE_PRESSURE_PLATE
+- ACACIA_PRESSURE_PLATE
+- DARK_OAK_PRESSURE_PLATE
+- REDSTONE_TORCH
+- REDSTONE_WALL_TORCH
+- REPEATER
+- BREWING_STAND
+- TRIPWIRE_HOOK
+- TRIPWIRE
+- HEAVY_WEIGHTED_PRESSURE_PLATE
+- LIGHT_WEIGHTED_PRESSURE_PLATE
+- COMPARATOR
+- REDSTONE_BLOCK
+- HOPPER
+- ACTIVATOR_RAIL
+- DROPPER
+- SLIME_BLOCK
+- OBSERVER
+- HONEY_BLOCK
+- LEVER
+- SCULK_SENSOR
+- POLISHED_BLACKSTONE_PRESSURE_PLATE
+- MANGROVE_PRESSURE_PLATE
+- CRIMSON_PRESSURE_PLATE
+- WARPED_PRESSURE_PLATE
+
+## The Contents of the Following Blocks Are Also Hidden:
+
+- SIGN
+- DISPENSER
+- CHEST
+- TRAPPED_CHEST
+- FURNACE
+- BREWING_STAND
+- HOPPER
+- DROPPER
+- SHULKER_BOX
+- JUKEBOX
+- COMPARATOR
diff --git a/src/content/rules/en/quickgear.md b/src/content/rules/en/quickgear.md
new file mode 100644
index 0000000..3972ead
--- /dev/null
+++ b/src/content/rules/en/quickgear.md
@@ -0,0 +1,31 @@
+---
+translationKey: qg
+---
+
+# QuickGear-Ruleset
+
+QuickGears are constructed in version 1.20.
+
+## Dimensions
+
+Max. 20 blocks deep (+ 1 block for design on each side) (22)
+Max. 35 blocks wide (+ 1 block for design on each side) (37)
+Max. 26 blocks high
+
+No block may leave a QuickGear.
+
+## Materials
+
+All blocks in a QuickGear must by destructible by TNT explosions (except for water).
+There must not be any pre-installed TNT blocks in a QuickGear.
+Blocks with inventories may only contain flowers, honey bottles and horse armor.
+Dispensers may only individually contain one stack of fire charges or one stack of arrows (without effects).
+
+## Design
+
+A design is very welcome, but not required.
+
+## Bug-Using
+
+Primed TNT may only be created from TNT blocks that players have placed.
+The duplication of TNT is prohibited.
\ No newline at end of file