[~] Moved get_sdk_version on main server_mc_manager scope

This commit is contained in:
Charles Le Maux 2024-09-14 16:34:00 +02:00
parent f62c5fc856
commit 89145b15a4
2 changed files with 7 additions and 7 deletions

View File

@ -35,12 +35,6 @@ class MinecraftServerManager:
" -XX:MaxTenuringThreshold=1 -Daikars.new.flags=true"
" -Dusing.aikars.flags=https://mcutils.com")
get_sdk_version: Callable[[str], str] = version_range_checker(("1.0", "1.15.2", "11"),
("1.16.1", "1.18.1", "17"),
default_sdk="21")
java: str = f"/usr/lib/jvm/java-{get_sdk_version(version)}-openjdk/bin/java"
command = f"{java} -Xmx{memory_size} {reg_flags} -jar {jar_file} --nogui"
@ -174,5 +168,9 @@ def version_range_checker(*ranges: tuple[str, str, str], default_sdk: str = "jav
return check_version
get_sdk_version: Callable[[str], str] = version_range_checker(("1.0", "1.15.2", "11"),
("1.16.1", "1.18.1", "17"),
default_sdk="21")
if __name__ == "__main__":
pass

View File

@ -3,6 +3,8 @@ import shutil
from typing import Callable, Union
import firebase_manager
import server_mc_manager
from generic_executor import mc_manager
def ban_user(user_id: str):
@ -38,5 +40,5 @@ if __name__ == '__main__':
organize_minecraft_files(
listdir("/home/hapso/Desktop/Personal/servii-backend/servers/paper"),
"/home/hapso/Desktop/Personal/servii-backend/servers/paper")
'''
'''S
pass