diff --git a/server_mc_manager.py b/server_mc_manager.py index 92f87fa..810433f 100644 --- a/server_mc_manager.py +++ b/server_mc_manager.py @@ -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 diff --git a/unit_test.py b/unit_test.py index 8c842c0..487231b 100644 --- a/unit_test.py +++ b/unit_test.py @@ -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