1
0
Fork 0

Some Minecraft changes

This commit is contained in:
Avery 2025-06-28 00:09:06 +02:00
parent 037230706c
commit 49271c6b74
Signed by: Avery
GPG key ID: B684FD451B692E04
2 changed files with 4 additions and 2 deletions

View file

@ -6,13 +6,14 @@ let
packageNameToHumanString = packageName:
(let
getSections = packageName:
# Probably only matches Fabric servers, change as needed
builtins.match
"^minecraft-server-([0-9a-zA-Z.]*)-([a-zA-Z-]*)-([0-9a-zA-Z.]*)$"
packageName;
sections = (getSections packageName);
getSection = idx:
if sections == null then "Unknown" else builtins.elemAt sections idx;
in "Minecraft Server ${getSection 0} with ${
in "Minecraft ${getSection 0} with ${
lib.strings.toSentenceCase (getSection 1)
} ${getSection 2}");
playersToOps = players:
@ -98,7 +99,7 @@ in {
};
files = {
"ops.json".value = playersToOps (with players; [ engullejamones ]);
"whitelist.json".value = with players; [ engullejamones ];
"whitelist.json".value = with players; [ engullejamones dankoszz ];
};
};
};

View file

@ -7,4 +7,5 @@ builtins.listToAttrs (map (player: {
}) [
[ "engullejamones" "b65a1bc3-c6a0-4e8c-99b8-3538cfec0cfc" ]
[ "dankoszz" "87b47db0-4dd3-469c-8dfd-c21095dadd93" ]
])