mcserver-cli 4.6.2__tar.gz → 4.7.0__tar.gz
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_cli-4.6.2 → mcserver_cli-4.7.0}/CHANGELOG.md +19 -10
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/PKG-INFO +5 -3
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/README.md +4 -2
- mcserver_cli-4.7.0/src/mcserver/__init__.py +1 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/cli.py +2 -2
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/op_grant.py +6 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/op_list.py +5 -4
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/op_revoke.py +5 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/print_help.py +1 -1
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/whitelist_add.py +9 -4
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/whitelist_list.py +5 -4
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/whitelist_remove.py +7 -1
- mcserver_cli-4.6.2/src/mcserver/__init__.py +0 -1
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/.gitignore +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/CONTRIBUTING.md +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/LICENSE +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/NOTES.txt +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/legacy/mcserver_v2.0.0.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/pyproject.toml +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/__main__.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/__main__.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/app.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/caching.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/__init__.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/add_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/import_setup.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/initialize_server.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/list_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/remove_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/search_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/server_status.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/show_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/start_server.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/stop_server.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/commands/update_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/config.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/constants.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/fabricmc/meta.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/legacy_fabric/meta.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/metadata.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/minecraft/api.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/minecraft/player_identity.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/__init__.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/get_project_informations.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/get_project_versions.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/search_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/constants.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/modpack.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/paths.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/project_records.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/shared.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/slug_index.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/__init__.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/project_information.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/project_version.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/search_projects.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/shared.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/mojang/eula.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/mojang/manifest.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/mysterious.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/networking.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/papermc/api.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/paths.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/purpurmc/api.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/quiltmc/meta.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/resolver.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/banned_ips.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/banned_players.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/ops.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/paths.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/properties.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/server_properties.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/shared.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/usercaches.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/server_files/whitelist.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/shared.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/state.py +0 -0
- {mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/zip_app.py +0 -0
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.7.0] - 2026-11-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `whitelist add` and `op grant` create the respective file if not exust
|
|
15
|
+
- added '[optional]' in help for `whitelist add` and `op grant` `--online-mode`
|
|
16
|
+
- Error message for whitelist and op for file not found
|
|
17
|
+
|
|
10
18
|
## [4.6.0] - 2026-11-13
|
|
11
19
|
|
|
12
20
|
### Added
|
|
@@ -23,13 +31,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
31
|
|
|
24
32
|
### Changed
|
|
25
33
|
|
|
26
|
-
- `whitelist add/remove` and `op grant/revoke`
|
|
34
|
+
- `whitelist add/remove` and `op grant/revoke` are now atomic in writing the file.
|
|
27
35
|
|
|
28
36
|
## [4.5.0] - 2026-11-04
|
|
29
37
|
|
|
30
38
|
### Added
|
|
31
39
|
|
|
32
|
-
- `whitelist add` and `op
|
|
40
|
+
- `whitelist add` and `op grant` command (limited to 10 players at once for online mode for name)
|
|
33
41
|
|
|
34
42
|
### Changed
|
|
35
43
|
|
|
@@ -39,10 +47,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
39
47
|
|
|
40
48
|
### Added
|
|
41
49
|
|
|
42
|
-
- `op revoke` to revoke operator players permission
|
|
50
|
+
- `op revoke` to revoke operator players permission based on UUIDs or names
|
|
43
51
|
- Player count to `whitelist list`
|
|
44
52
|
|
|
45
|
-
###
|
|
53
|
+
### Fixed
|
|
46
54
|
|
|
47
55
|
- Wrong description for `whitelist remove`
|
|
48
56
|
- Fixing the wrong singular text in whitelist when no whitelisted player
|
|
@@ -64,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
64
72
|
### Fixed
|
|
65
73
|
|
|
66
74
|
- `search` now say "No environment"
|
|
67
|
-
- `search` correctly use the
|
|
75
|
+
- `search` correctly use the appropriate project type for the homepage
|
|
68
76
|
|
|
69
77
|
## [4.0.0] - 2026-10-31
|
|
70
78
|
|
|
@@ -82,7 +90,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
82
90
|
- Better `search` info message
|
|
83
91
|
- slug_index.json is now a global cache
|
|
84
92
|
|
|
85
|
-
###
|
|
93
|
+
### Fixed
|
|
86
94
|
|
|
87
95
|
- Typo in the `add` command help
|
|
88
96
|
|
|
@@ -127,7 +135,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
127
135
|
### Fixed
|
|
128
136
|
|
|
129
137
|
- The slug_to_id function to use existing format
|
|
130
|
-
- The
|
|
138
|
+
- The Modrinth API base to use https instead of http
|
|
131
139
|
|
|
132
140
|
### Removed
|
|
133
141
|
|
|
@@ -155,7 +163,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
155
163
|
|
|
156
164
|
### Changed
|
|
157
165
|
|
|
158
|
-
- Code structure to be
|
|
166
|
+
- Code structure to be modular with zipapp
|
|
159
167
|
- Rename project index directory to `project_indexes`
|
|
160
168
|
|
|
161
169
|
### Fixed
|
|
@@ -191,7 +199,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
191
199
|
### Added
|
|
192
200
|
|
|
193
201
|
- Code type hinting
|
|
194
|
-
- `fetch_project_versions` is more close to
|
|
202
|
+
- `fetch_project_versions` is more close to Modrinth docs
|
|
195
203
|
|
|
196
204
|
### Fixed
|
|
197
205
|
|
|
@@ -276,7 +284,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
276
284
|
- Better mod conflict error
|
|
277
285
|
- Faster mod resolving
|
|
278
286
|
|
|
279
|
-
[unreleased]: https://github.com/Othecat35/MCServer/compare/v4.
|
|
287
|
+
[unreleased]: https://github.com/Othecat35/MCServer/compare/v4.7.0...HEAD
|
|
288
|
+
[4.7.0]: https://github.com/Othecat35/MCServer/compare/v4.6.0...v4.7.0
|
|
280
289
|
[4.6.0]: https://github.com/Othecat35/MCServer/compare/v4.5.2...v4.6.0
|
|
281
290
|
[4.5.2]: https://github.com/Othecat35/MCServer/compare/v4.5.1...v4.5.2
|
|
282
291
|
[4.5.1]: https://github.com/Othecat35/MCServer/compare/v4.5.0...v4.5.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mcserver-cli
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.7.0
|
|
4
4
|
Summary: A CLI tool to manage Minecraft: Java Edition servers.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Othecat35/MCServer
|
|
6
6
|
Project-URL: Repository, https://github.com/Othecat35/MCServer.git
|
|
@@ -41,6 +41,7 @@ Supported platforms:
|
|
|
41
41
|
- Run `fish_add_path ~/bin` if you're using FISH
|
|
42
42
|
|
|
43
43
|
## Usage
|
|
44
|
+
- Add mods or plugins: `mcserver add <projects>`
|
|
44
45
|
- Initialize a server: `mcserver init [options]`
|
|
45
46
|
- Grant players operator: `mcserver op grant <player> [options]`
|
|
46
47
|
- List operator players: `mcserver op list`
|
|
@@ -54,13 +55,14 @@ Supported platforms:
|
|
|
54
55
|
- Remove whitelisted players: `mcserver whitelist remove <players>`
|
|
55
56
|
|
|
56
57
|
### Examples
|
|
57
|
-
- Create
|
|
58
|
+
- Create a Fabric 1.20.1 server, add Thdilos' Fox Origin, and start the server
|
|
58
59
|
```bash
|
|
59
60
|
mcserver init --game-version=1.20.1 --loader=fabric
|
|
61
|
+
mcserver add thdilos-fox-origin
|
|
60
62
|
mcserver start
|
|
61
63
|
```
|
|
62
64
|
|
|
63
|
-
- Search
|
|
65
|
+
- Search 50 Fabric mods for Minecraft 1.20.1 from Modrinth
|
|
64
66
|
```bash
|
|
65
67
|
mcserver search --loader=fabric --game-version=1.20.1 --limit=50
|
|
66
68
|
```
|
|
@@ -28,6 +28,7 @@ Supported platforms:
|
|
|
28
28
|
- Run `fish_add_path ~/bin` if you're using FISH
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
|
+
- Add mods or plugins: `mcserver add <projects>`
|
|
31
32
|
- Initialize a server: `mcserver init [options]`
|
|
32
33
|
- Grant players operator: `mcserver op grant <player> [options]`
|
|
33
34
|
- List operator players: `mcserver op list`
|
|
@@ -41,13 +42,14 @@ Supported platforms:
|
|
|
41
42
|
- Remove whitelisted players: `mcserver whitelist remove <players>`
|
|
42
43
|
|
|
43
44
|
### Examples
|
|
44
|
-
- Create
|
|
45
|
+
- Create a Fabric 1.20.1 server, add Thdilos' Fox Origin, and start the server
|
|
45
46
|
```bash
|
|
46
47
|
mcserver init --game-version=1.20.1 --loader=fabric
|
|
48
|
+
mcserver add thdilos-fox-origin
|
|
47
49
|
mcserver start
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
- Search
|
|
52
|
+
- Search 50 Fabric mods for Minecraft 1.20.1 from Modrinth
|
|
51
53
|
```bash
|
|
52
54
|
mcserver search --loader=fabric --game-version=1.20.1 --limit=50
|
|
53
55
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "4.7.0"
|
|
@@ -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(
|
|
@@ -394,7 +394,7 @@ 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'
|
|
@@ -3,12 +3,18 @@ from argparse import Namespace
|
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
|
|
5
5
|
from ..minecraft.player_identity import separate_uuids_and_names
|
|
6
|
+
from ..paths import current_dir
|
|
6
7
|
from ..server_files.ops import OperatorPlayer
|
|
8
|
+
from ..server_files.paths import ops_file_path
|
|
7
9
|
|
|
8
10
|
logger = logging.getLogger(__name__)
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def run(args: Namespace) -> int:
|
|
14
|
+
if not ops_file_path.exists():
|
|
15
|
+
logger.info(f"Operator file '{ops_file_path.relative_to(current_dir)}' does not exist, creating new one")
|
|
16
|
+
ops_file_path.write_text("[]")
|
|
17
|
+
|
|
12
18
|
player_ids: list[str] = args.players
|
|
13
19
|
online_mode: str | None = args.online_mode
|
|
14
20
|
permission_level: int | None = args.permission_level
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from argparse import Namespace
|
|
3
3
|
|
|
4
|
+
from ..paths import current_dir
|
|
4
5
|
from ..server_files import ops
|
|
6
|
+
from ..server_files.paths import ops_file_path
|
|
5
7
|
from ..shared import pluralize
|
|
6
8
|
|
|
7
9
|
logger = logging.getLogger(__name__)
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
def run(args: Namespace) -> int:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
logger.error(f"Operator file '{ops.ops_file_path}' not found.")
|
|
13
|
+
if not ops_file_path.exists():
|
|
14
|
+
logger.error(f"Operator file '{ops_file_path.relative_to(current_dir)}' does not exist")
|
|
14
15
|
return 1
|
|
15
16
|
|
|
16
17
|
operator_players = ops.list_players()
|
|
@@ -18,7 +19,7 @@ def run(args: Namespace) -> int:
|
|
|
18
19
|
player_count = len(operator_players)
|
|
19
20
|
if player_count == 0:
|
|
20
21
|
logger.info("There's no operator player.")
|
|
21
|
-
return
|
|
22
|
+
return 1
|
|
22
23
|
|
|
23
24
|
player_list: list[str] = []
|
|
24
25
|
for player in operator_players:
|
|
@@ -2,13 +2,18 @@ import logging
|
|
|
2
2
|
from argparse import Namespace
|
|
3
3
|
|
|
4
4
|
from ..minecraft.player_identity import separate_uuids_and_names
|
|
5
|
+
from ..paths import current_dir
|
|
5
6
|
from ..server_files import ops
|
|
7
|
+
from ..server_files.paths import ops_file_path
|
|
6
8
|
from ..shared import pluralize
|
|
7
9
|
|
|
8
10
|
logger = logging.getLogger(__name__)
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def run(args: Namespace) -> int:
|
|
14
|
+
if not ops_file_path.exists():
|
|
15
|
+
logger.error(f"Operator file '{ops_file_path.relative_to(current_dir)}' does not exist")
|
|
16
|
+
return 1
|
|
12
17
|
player_ids: list[str] = args.players
|
|
13
18
|
|
|
14
19
|
player_uuids, player_names = separate_uuids_and_names(player_ids)
|
|
@@ -3,12 +3,18 @@ from argparse import Namespace
|
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
|
|
5
5
|
from ..minecraft.player_identity import separate_uuids_and_names
|
|
6
|
+
from ..paths import current_dir
|
|
7
|
+
from ..server_files.paths import whitelist_file_path
|
|
6
8
|
from ..server_files.whitelist import WhitelistedPlayer
|
|
7
9
|
|
|
8
10
|
logger = logging.getLogger(__name__)
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def run(args: Namespace) -> int:
|
|
14
|
+
if not whitelist_file_path.exists():
|
|
15
|
+
logger.info(f"Whitelist file '{whitelist_file_path.relative_to(current_dir)}' does not exist, creating new one")
|
|
16
|
+
whitelist_file_path.write_text("[]")
|
|
17
|
+
|
|
12
18
|
player_ids: list[str] = args.players
|
|
13
19
|
online_mode: str | None = args.online_mode
|
|
14
20
|
|
|
@@ -26,7 +32,7 @@ def run(args: Namespace) -> int:
|
|
|
26
32
|
|
|
27
33
|
is_online_mode = server_properties.get_online_mode()
|
|
28
34
|
else:
|
|
29
|
-
is_online_mode = online_mode != "false"
|
|
35
|
+
is_online_mode = online_mode.lower() != "false"
|
|
30
36
|
|
|
31
37
|
whitelisted_players: list[WhitelistedPlayer] = []
|
|
32
38
|
if is_online_mode:
|
|
@@ -71,8 +77,8 @@ def run(args: Namespace) -> int:
|
|
|
71
77
|
|
|
72
78
|
player_count: int = len(whitelisted_players)
|
|
73
79
|
if player_count == 0:
|
|
74
|
-
logger.info("There are no whitelisted
|
|
75
|
-
return
|
|
80
|
+
logger.info("There are no player to be whitelisted.")
|
|
81
|
+
return 1
|
|
76
82
|
|
|
77
83
|
player_list: list[str] = []
|
|
78
84
|
for player in whitelisted_players:
|
|
@@ -84,5 +90,4 @@ def run(args: Namespace) -> int:
|
|
|
84
90
|
|
|
85
91
|
player_list.sort()
|
|
86
92
|
print("\n".join(player_list))
|
|
87
|
-
|
|
88
93
|
return 0
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from argparse import Namespace
|
|
3
3
|
|
|
4
|
+
from ..paths import current_dir
|
|
4
5
|
from ..server_files import whitelist
|
|
6
|
+
from ..server_files.paths import whitelist_file_path
|
|
5
7
|
from ..shared import pluralize
|
|
6
8
|
|
|
7
9
|
logger = logging.getLogger(__name__)
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
def run(args: Namespace) -> int:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
logger.error(f"Whitelist file ({whitelist_file}) not found!")
|
|
13
|
+
if not whitelist_file_path.exists():
|
|
14
|
+
logger.error(f"Whitelist file '{whitelist_file_path.relative_to(current_dir)}' does not exist")
|
|
14
15
|
return 1
|
|
15
16
|
|
|
16
17
|
whitelisted_players = whitelist.list_players()
|
|
@@ -18,7 +19,7 @@ def run(args: Namespace) -> int:
|
|
|
18
19
|
player_count: int = len(whitelisted_players)
|
|
19
20
|
if player_count == 0:
|
|
20
21
|
logger.info("There are no whitelisted player.")
|
|
21
|
-
return
|
|
22
|
+
return 1
|
|
22
23
|
|
|
23
24
|
player_list: list[str] = []
|
|
24
25
|
for player in whitelisted_players:
|
|
@@ -2,13 +2,19 @@ import logging
|
|
|
2
2
|
from argparse import Namespace
|
|
3
3
|
|
|
4
4
|
from ..minecraft.player_identity import separate_uuids_and_names
|
|
5
|
+
from ..paths import current_dir
|
|
5
6
|
from ..server_files import whitelist
|
|
7
|
+
from ..server_files.paths import whitelist_file_path
|
|
6
8
|
from ..shared import pluralize
|
|
7
9
|
|
|
8
10
|
logger = logging.getLogger(__name__)
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def run(args: Namespace) -> int:
|
|
14
|
+
if not whitelist_file_path.exists():
|
|
15
|
+
logger.error(f"Whitelist file '{whitelist_file_path.relative_to(current_dir)}' does not exist")
|
|
16
|
+
return 1
|
|
17
|
+
|
|
12
18
|
player_ids: list[str] = args.players
|
|
13
19
|
|
|
14
20
|
player_uuids, player_names = separate_uuids_and_names(player_ids)
|
|
@@ -17,7 +23,7 @@ def run(args: Namespace) -> int:
|
|
|
17
23
|
player_count: int = len(removed_players)
|
|
18
24
|
if player_count == 0:
|
|
19
25
|
logger.info("No matching player found.")
|
|
20
|
-
return
|
|
26
|
+
return 1
|
|
21
27
|
|
|
22
28
|
player_list: list[str] = []
|
|
23
29
|
for player in removed_players:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "4.6.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/get_project_informations.py
RENAMED
|
File without changes
|
{mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/apis/get_project_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mcserver_cli-4.6.2 → mcserver_cli-4.7.0}/src/mcserver/modrinth/typings/project_information.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|