mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[~] Moved get_sdk_version on main server_mc_manager scope
This commit is contained in:
parent
f62c5fc856
commit
89145b15a4
@ -35,12 +35,6 @@ class MinecraftServerManager:
|
|||||||
" -XX:MaxTenuringThreshold=1 -Daikars.new.flags=true"
|
" -XX:MaxTenuringThreshold=1 -Daikars.new.flags=true"
|
||||||
" -Dusing.aikars.flags=https://mcutils.com")
|
" -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"
|
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"
|
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
|
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__":
|
if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
@ -3,6 +3,8 @@ import shutil
|
|||||||
from typing import Callable, Union
|
from typing import Callable, Union
|
||||||
|
|
||||||
import firebase_manager
|
import firebase_manager
|
||||||
|
import server_mc_manager
|
||||||
|
from generic_executor import mc_manager
|
||||||
|
|
||||||
|
|
||||||
def ban_user(user_id: str):
|
def ban_user(user_id: str):
|
||||||
@ -38,5 +40,5 @@ if __name__ == '__main__':
|
|||||||
organize_minecraft_files(
|
organize_minecraft_files(
|
||||||
listdir("/home/hapso/Desktop/Personal/servii-backend/servers/paper"),
|
listdir("/home/hapso/Desktop/Personal/servii-backend/servers/paper"),
|
||||||
"/home/hapso/Desktop/Personal/servii-backend/servers/paper")
|
"/home/hapso/Desktop/Personal/servii-backend/servers/paper")
|
||||||
'''
|
'''S
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user