mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[+] Union function declaration
This commit is contained in:
parent
c2f21cb1c1
commit
cfec606d23
@ -1,6 +1,7 @@
|
||||
import subprocess
|
||||
import shlex
|
||||
import time
|
||||
from typing import Union
|
||||
|
||||
|
||||
class MinecraftServerManager:
|
||||
@ -13,7 +14,7 @@ class MinecraftServerManager:
|
||||
self.cooldowns = {}
|
||||
|
||||
def start_server(self, server_directory: str, port: int,
|
||||
java_executable='java', jar_file='server.jar', memory_size='2048M') -> int or None:
|
||||
java_executable='java', jar_file='server.jar', memory_size='2048M') -> Union[int, None]:
|
||||
|
||||
if port in self.servers:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user