Skip to content

Commit

Permalink
updated legacy_eng/esp.py add legacy txt on menus
Browse files Browse the repository at this point in the history
  • Loading branch information
ngdplnk committed Nov 2, 2023
1 parent 1ec8f01 commit 0e93757
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions newcode/launcher/legacy_eng.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def limpiar_consola():

# TITLE CHANGE
if sys.platform.startswith('win32'):# WINDOWS
ctypes.windll.kernel32.SetConsoleTitleW("Server Launcher for Minecraft") # type: ignore
ctypes.windll.kernel32.SetConsoleTitleW("Legacy - Server Launcher for Minecraft") # type: ignore
elif sys.platform.startswith('linux') or sys.platform.startswith('darwin'):# LINUX OR MACOS
sys.stdout.write(f"\x1b]2;Server Launcher for Minecraft\x07")
sys.stdout.write(f"\x1b]2;Legacy - Server Launcher for Minecraft\x07")

# START
def ram():
limpiar_consola()
print("Server Launcher for Minecraft\n-------------------------------------\n\nYou can return to Main Menu with 'N', or")
print("Legacy - Server Launcher for Minecraft\n-------------------------------------\n\nYou can return to Main Menu with 'N', or")
rammount = input("Type the amount of RAM to assign to your server= ")
try:
if rammount.lower() == 'n':
Expand All @@ -38,14 +38,14 @@ def ram():
with open(eula_archivo, "w") as reemplazo:
reemplazo.write(eula)
limpiar_consola()
print("Server Launcher for Minecraft\n-------------------------------------\n")
print("Legacy - Server Launcher for Minecraft\n-------------------------------------\n")
print("Server starting with",gbs,"GB of RAM")
comando_java = f"java -Xmx{gbs}G -Xms{gbs}G -jar server.jar nogui"
comando_final = str(comando_java)
subprocess.run(comando_final, shell=True)
input("\nPress ENTER to continue.")
limpiar_consola()
print("Server Launcher for Minecraft\n-------------------------------------\n\nServer Closed\n\nYou can see the log in 'logs' folder\n")
print("Legacy - Server Launcher for Minecraft\n-------------------------------------\n\nServer Closed\n\nYou can see the log in 'logs' folder\n")
input("Press ENTER to continue.")
except ValueError:
ram()
Expand All @@ -54,7 +54,7 @@ def ram():
def about():
limpiar_consola()
url = "https://github.com/NGDPLNk/SSTools4MC/blob/main/LICENSE"
print("Server Launcher for Minecraft\n-------------------------------------\n\nMost recent License information will be opened in the browser\n")
print("Legacy - Server Launcher for Minecraft\n-------------------------------------\n\nMost recent License information will be opened in the browser\n")
print(url)
print("")
input("Press ENTER to continue.")
Expand All @@ -70,7 +70,7 @@ def exiit():
# MAIN MENU
while True:
limpiar_consola()
seleccion = input("Server Launcher for Minecraft\n-------------------------------------\n\nMain Menu\n\n(1) Start Server\n(2) License\n(3) Exit\n\nSelect an option= ")
seleccion = input("Legacy - Server Launcher for Minecraft\n-------------------------------------\n\nMain Menu\n\n(1) Start Server\n(2) License\n(3) Exit\n\nSelect an option= ")
if seleccion == "1":
ram()
elif seleccion == "2":
Expand Down
14 changes: 7 additions & 7 deletions newcode/launcher/legacy_esp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def limpiar_consola():

# NOMBRE VENTANA
if sys.platform.startswith('win32'):# WINDOWS
ctypes.windll.kernel32.SetConsoleTitleW("Lanzador de Servidores para Minecraft") # type: ignore
ctypes.windll.kernel32.SetConsoleTitleW("Legacy - Lanzador de Servidores para Minecraft") # type: ignore
elif sys.platform.startswith('linux') or sys.platform.startswith('darwin'):# LINUX O MACOS
sys.stdout.write(f"\x1b]2;Lanzador de Servidores para Minecraft\x07")
sys.stdout.write(f"\x1b]2;Legacy - Lanzador de Servidores para Minecraft\x07")

# INICIO
def ram():
limpiar_consola()
print("Lanzador de Servidores para Minecraft\n-------------------------------------\n\nPuedes volver al Menú Principal con 'N', o")
print("Legacy - Lanzador de Servidores para Minecraft\n-------------------------------------\n\nPuedes volver al Menú Principal con 'N', o")
rammount = input("Ingresa los GB de RAM para asignar al Servidor= ")
try:
if rammount.lower() == 'n':
Expand All @@ -38,14 +38,14 @@ def ram():
with open(eula_archivo, "w") as reemplazo:
reemplazo.write(eula)
limpiar_consola()
print("Lanzador de Servidores para Minecraft\n-------------------------------------\n")
print("Legacy - Lanzador de Servidores para Minecraft\n-------------------------------------\n")
print("Iniciando el Server con",gbs,"GB de RAM")
comando_java = f"java -Xmx{gbs}G -Xms{gbs}G -jar server.jar nogui"
comando_final = str(comando_java)
subprocess.run(comando_final, shell=True)
input("\nPresiona ENTER para continuar.")
limpiar_consola()
print("Lanzador de Servidores para Minecraft\n-------------------------------------\n\nServidor Cerrado\n\nPuedes revisar el registro en la carpeta 'logs'\n")
print("Legacy - Lanzador de Servidores para Minecraft\n-------------------------------------\n\nServidor Cerrado\n\nPuedes revisar el registro en la carpeta 'logs'\n")
input("Presiona ENTER para continuar.")
except ValueError:
ram()
Expand All @@ -54,7 +54,7 @@ def ram():
def about():
limpiar_consola()
url = "https://github.com/NGDPLNk/SSTools4MC/blob/main/LICENSE"
print("Lanzador de Servidores para Minecraft\n-------------------------------------\n\nSe abrira la informacion sobre Licencia mas reciente en el navegador\n")
print("Legacy - Lanzador de Servidores para Minecraft\n-------------------------------------\n\nSe abrira la informacion sobre Licencia mas reciente en el navegador\n")
print(url)
print("")
input("Presiona ENTER para continuar.")
Expand All @@ -70,7 +70,7 @@ def exiit():
# MENÚ PRINCIPAL
while True:
limpiar_consola()
seleccion = input("Lanzador de Servidores para Minecraft\n-------------------------------------\n\nMenú Principal\n\n(1) Iniciar Servidor\n(2) Licencia\n(3) Salir\n\nSelecciona una opción= ")
seleccion = input("Legacy - Lanzador de Servidores para Minecraft\n-------------------------------------\n\nMenú Principal\n\n(1) Iniciar Servidor\n(2) Licencia\n(3) Salir\n\nSelecciona una opción= ")
if seleccion == "1":
ram()
elif seleccion == "2":
Expand Down

0 comments on commit 0e93757

Please sign in to comment.