mcserver-cli 4.5.2__py3-none-any.whl → 4.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcserver/__init__.py +1 -1
- mcserver/cli.py +24 -24
- mcserver/commands/add_projects.py +56 -581
- mcserver/commands/op_grant.py +6 -0
- mcserver/commands/op_list.py +5 -4
- mcserver/commands/op_revoke.py +5 -0
- mcserver/commands/print_help.py +1 -1
- mcserver/commands/start_server.py +14 -13
- mcserver/commands/whitelist_add.py +9 -4
- mcserver/commands/whitelist_list.py +5 -4
- mcserver/commands/whitelist_remove.py +7 -1
- mcserver/modrinth/slug_index.py +13 -5
- mcserver/networking.py +31 -13
- {mcserver_cli-4.5.2.dist-info → mcserver_cli-4.7.0.dist-info}/METADATA +5 -3
- {mcserver_cli-4.5.2.dist-info → mcserver_cli-4.7.0.dist-info}/RECORD +18 -18
- {mcserver_cli-4.5.2.dist-info → mcserver_cli-4.7.0.dist-info}/WHEEL +0 -0
- {mcserver_cli-4.5.2.dist-info → mcserver_cli-4.7.0.dist-info}/entry_points.txt +0 -0
- {mcserver_cli-4.5.2.dist-info → mcserver_cli-4.7.0.dist-info}/licenses/LICENSE +0 -0
mcserver/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "4.
|
|
1
|
+
__version__ = "4.7.0"
|
mcserver/cli.py
CHANGED
|
@@ -116,8 +116,8 @@ def main() -> int:
|
|
|
116
116
|
# Parser Setup
|
|
117
117
|
parser = argparse.ArgumentParser(
|
|
118
118
|
prog="mcserver",
|
|
119
|
-
description="A CLI tool for managing Minecraft: Java Edition servers
|
|
120
|
-
epilog="Created for Linux and Termux only
|
|
119
|
+
description="A CLI tool for managing Minecraft: Java Edition servers",
|
|
120
|
+
epilog="Created for Linux and Termux only",
|
|
121
121
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
122
122
|
prefix_chars="-",
|
|
123
123
|
add_help=True,
|
|
@@ -140,20 +140,20 @@ def main() -> int:
|
|
|
140
140
|
commands = parser.add_subparsers(title="Commands")
|
|
141
141
|
|
|
142
142
|
# 'add' command
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
add_command = commands.add_parser(
|
|
144
|
+
"add",
|
|
145
|
+
help="Add mods or plugins",
|
|
146
|
+
description="Add mods or plugins from Modrinth",
|
|
147
|
+
)
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
add_command.set_defaults(command_name="add")
|
|
150
|
+
add_command.add_argument("projects", nargs="+", type=str, help="Project names")
|
|
151
151
|
|
|
152
152
|
# 'init' command
|
|
153
153
|
init_command = commands.add_parser(
|
|
154
154
|
"init",
|
|
155
155
|
help="Initialize server configurations",
|
|
156
|
-
description="Initialize the server configurations
|
|
156
|
+
description="Initialize the server configurations",
|
|
157
157
|
)
|
|
158
158
|
|
|
159
159
|
init_command.set_defaults(command_name="init")
|
|
@@ -220,7 +220,7 @@ def main() -> int:
|
|
|
220
220
|
|
|
221
221
|
# 'op' command
|
|
222
222
|
op_command = commands.add_parser(
|
|
223
|
-
"op", help="Manage operator players", description="Manage the operator status
|
|
223
|
+
"op", help="Manage operator players", description="Manage the operator status"
|
|
224
224
|
)
|
|
225
225
|
|
|
226
226
|
op_command.set_defaults(parser=op_command)
|
|
@@ -229,8 +229,8 @@ def main() -> int:
|
|
|
229
229
|
# 'op grant'
|
|
230
230
|
op_grant_command = op_subcommands.add_parser(
|
|
231
231
|
"grant",
|
|
232
|
-
help="Grant players operator permission
|
|
233
|
-
description="Grant players operator permission
|
|
232
|
+
help="Grant players operator permission",
|
|
233
|
+
description="Grant players operator permission",
|
|
234
234
|
)
|
|
235
235
|
|
|
236
236
|
op_grant_command.set_defaults(command_name="op_grant")
|
|
@@ -249,7 +249,7 @@ def main() -> int:
|
|
|
249
249
|
type=str,
|
|
250
250
|
choices=["true", "false"],
|
|
251
251
|
metavar="Boolean",
|
|
252
|
-
help="The server's online mode (true/false)",
|
|
252
|
+
help="The server's online mode (true/false) [optional]",
|
|
253
253
|
)
|
|
254
254
|
|
|
255
255
|
op_grant_command.add_argument(
|
|
@@ -262,7 +262,7 @@ def main() -> int:
|
|
|
262
262
|
|
|
263
263
|
# 'op list'
|
|
264
264
|
op_list_command = op_subcommands.add_parser(
|
|
265
|
-
"list", help="List operator players", description="List all operator players
|
|
265
|
+
"list", help="List operator players", description="List all operator players"
|
|
266
266
|
)
|
|
267
267
|
|
|
268
268
|
op_list_command.set_defaults(command_name="op_list")
|
|
@@ -271,7 +271,7 @@ def main() -> int:
|
|
|
271
271
|
op_revoke_command = op_subcommands.add_parser(
|
|
272
272
|
"revoke",
|
|
273
273
|
help="Revoke operator players permission",
|
|
274
|
-
description="Revoke operator players permission
|
|
274
|
+
description="Revoke operator players permission",
|
|
275
275
|
)
|
|
276
276
|
|
|
277
277
|
op_revoke_command.set_defaults(command_name="op_revoke")
|
|
@@ -283,7 +283,7 @@ def main() -> int:
|
|
|
283
283
|
search_command = commands.add_parser(
|
|
284
284
|
"search",
|
|
285
285
|
help="Search Modrinth projects",
|
|
286
|
-
description="Search projects from Modrinth
|
|
286
|
+
description="Search projects from Modrinth",
|
|
287
287
|
)
|
|
288
288
|
|
|
289
289
|
search_command.set_defaults(command_name="search")
|
|
@@ -343,7 +343,7 @@ def main() -> int:
|
|
|
343
343
|
show_command = commands.add_parser(
|
|
344
344
|
"show",
|
|
345
345
|
help="Show Modrinth project information",
|
|
346
|
-
description="Show information about Modrinth projects
|
|
346
|
+
description="Show information about Modrinth projects",
|
|
347
347
|
)
|
|
348
348
|
|
|
349
349
|
show_command.set_defaults(command_name="show")
|
|
@@ -353,7 +353,7 @@ def main() -> int:
|
|
|
353
353
|
|
|
354
354
|
# 'start' command
|
|
355
355
|
start_command = commands.add_parser(
|
|
356
|
-
"start", help="Start the server", description="Install and start the server
|
|
356
|
+
"start", help="Start the server", description="Install and start the server"
|
|
357
357
|
)
|
|
358
358
|
|
|
359
359
|
start_command.set_defaults(command_name="start")
|
|
@@ -371,7 +371,7 @@ def main() -> int:
|
|
|
371
371
|
whitelist_command = commands.add_parser(
|
|
372
372
|
"whitelist",
|
|
373
373
|
help="Manage whitelisted players",
|
|
374
|
-
description="Manage the player whitelist
|
|
374
|
+
description="Manage the player whitelist",
|
|
375
375
|
)
|
|
376
376
|
|
|
377
377
|
whitelist_command.set_defaults(parser=whitelist_command)
|
|
@@ -381,7 +381,7 @@ def main() -> int:
|
|
|
381
381
|
whitelist_add_command = whitelist_subcommands.add_parser(
|
|
382
382
|
"add",
|
|
383
383
|
help="Add players to the whitelist",
|
|
384
|
-
description="Add players to the whitelist
|
|
384
|
+
description="Add players to the whitelist",
|
|
385
385
|
)
|
|
386
386
|
|
|
387
387
|
whitelist_add_command.set_defaults(command_name="whitelist_add")
|
|
@@ -394,14 +394,14 @@ def main() -> int:
|
|
|
394
394
|
type=str,
|
|
395
395
|
choices=["true", "false"],
|
|
396
396
|
metavar="Boolean",
|
|
397
|
-
help="The server's online mode (true/false)",
|
|
397
|
+
help="The server's online mode (true/false) [optional]",
|
|
398
398
|
)
|
|
399
399
|
|
|
400
400
|
# 'whitelist list'
|
|
401
401
|
whitelist_list_command = whitelist_subcommands.add_parser(
|
|
402
402
|
"list",
|
|
403
403
|
help="List whitelisted players",
|
|
404
|
-
description="List all whitelisted players
|
|
404
|
+
description="List all whitelisted players",
|
|
405
405
|
)
|
|
406
406
|
|
|
407
407
|
whitelist_list_command.set_defaults(command_name="whitelist_list")
|
|
@@ -410,7 +410,7 @@ def main() -> int:
|
|
|
410
410
|
whitelist_remove_command = whitelist_subcommands.add_parser(
|
|
411
411
|
"remove",
|
|
412
412
|
help="Remove players from the whitelist",
|
|
413
|
-
description="Remove players from the whitelist
|
|
413
|
+
description="Remove players from the whitelist",
|
|
414
414
|
)
|
|
415
415
|
|
|
416
416
|
whitelist_remove_command.set_defaults(command_name="whitelist_remove")
|