Some Minecraft changes
This commit is contained in:
parent
037230706c
commit
49271c6b74
2 changed files with 4 additions and 2 deletions
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,4 +7,5 @@ builtins.listToAttrs (map (player: {
|
|||
}) [
|
||||
|
||||
[ "engullejamones" "b65a1bc3-c6a0-4e8c-99b8-3538cfec0cfc" ]
|
||||
[ "dankoszz" "87b47db0-4dd3-469c-8dfd-c21095dadd93" ]
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue