mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Check for java on forge server creation
This commit is contained in:
parent
49b412ff83
commit
a423cee40b
@ -404,6 +404,14 @@ class ServerHandler(BaseHandler):
|
||||
jar_type, server_type, server_version = server_parts
|
||||
# TODO: add server type check here and call the correct server
|
||||
# add functions if not a jar
|
||||
if server_type == "forge" and not self.helper.detect_java():
|
||||
translation = self.helper.translation.translate(
|
||||
"error",
|
||||
"installerJava",
|
||||
self.controller.users.get_user_lang_by_id(exec_user["user_id"]),
|
||||
).format(server_name)
|
||||
self.redirect(f"/panel/error?error={translation}")
|
||||
return
|
||||
new_server_id = self.controller.create_jar_server(
|
||||
jar_type,
|
||||
server_type,
|
||||
|
@ -179,6 +179,7 @@
|
||||
"internet": "We have detected the machine running Crafty has no connection to the internet. Client connections to the server may be limited.",
|
||||
"no-file": "We can't seem to locate the requested file. Double check the path. Does Crafty have proper permissions?",
|
||||
"noJava": "Server {} failed to start with error code: We have detected Java is not installed. Please install java then start the server.",
|
||||
"installerJava": "Failed to install {} : Forge Server Installs require Java. We have detected Java is not installed. Please install java then install the server.",
|
||||
"not-downloaded": "We can't seem to find your executable file. Has it finished downloading? Are the permissions set to executable?",
|
||||
"portReminder": "We have detected this is the first time {} has been run. Make sure to forward port {} through your router/firewall to make this remotely accessible from the internet.",
|
||||
"start-error": "Server {} failed to start with error code: {}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user