mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Revert back to 'Do not override' as default
This commit is contained in:
parent
7379545186
commit
28e313ee1d
@ -634,22 +634,14 @@ class PanelHandler(BaseHandler):
|
|||||||
return
|
return
|
||||||
page_data["java_versions"] = Helpers.find_java_installs()
|
page_data["java_versions"] = Helpers.find_java_installs()
|
||||||
server_obj: Servers = self.controller.servers.get_server_obj(server_id)
|
server_obj: Servers = self.controller.servers.get_server_obj(server_id)
|
||||||
current_java = shlex.split(server_obj.execution_command)[0]
|
|
||||||
page_java = []
|
page_java = []
|
||||||
page_data["java_versions"].append("java")
|
page_data["java_versions"].append("java")
|
||||||
page_data["current_java"] = current_java
|
|
||||||
for version in page_data["java_versions"]:
|
for version in page_data["java_versions"]:
|
||||||
temp_version = version + "/bin/java"
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
if version == "java" and current_java != version:
|
page_java.append(version)
|
||||||
page_java.append(version)
|
|
||||||
else:
|
|
||||||
if temp_version != current_java and version != "java":
|
|
||||||
page_java.append(version)
|
|
||||||
else:
|
else:
|
||||||
if len(version) > 0:
|
if len(version) > 0:
|
||||||
if version != current_java:
|
page_java.append(version)
|
||||||
page_java.append(version)
|
|
||||||
|
|
||||||
page_data["java_versions"] = page_java
|
page_data["java_versions"] = page_java
|
||||||
|
|
||||||
@ -1413,12 +1405,8 @@ class PanelHandler(BaseHandler):
|
|||||||
self.get_remote_ip(),
|
self.get_remote_ip(),
|
||||||
)
|
)
|
||||||
if java_selection != "java":
|
if java_selection != "java":
|
||||||
if (
|
if self.helper.is_os_windows():
|
||||||
self.helper.is_os_windows()
|
execution_list[0] = '"' + java_selection + '/bin/java"'
|
||||||
and not "/bin/java" in java_selection
|
|
||||||
):
|
|
||||||
if not "/bin/java" in java_selection:
|
|
||||||
execution_list[0] = '"' + java_selection + '/bin/java"'
|
|
||||||
else:
|
else:
|
||||||
execution_list[0] = '"' + java_selection + '"'
|
execution_list[0] = '"' + java_selection + '"'
|
||||||
else:
|
else:
|
||||||
|
@ -81,21 +81,15 @@
|
|||||||
{% end %}
|
{% end %}
|
||||||
{% if data['server_stats']['server_type'] == "minecraft-java" %}
|
{% if data['server_stats']['server_type'] == "minecraft-java" %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="java_selection">{{ translate('serverConfig', 'javaVersion', data['lang']) }} <small
|
<label for="java_selection">{{ translate('serverConfig', 'javaVersion', data['lang']) }}
|
||||||
class="text-muted ml-1"> - EXPERIMENTAL -- PLEASE REPORT ANY BUGS {{
|
<small class="text-muted ml-1">{{ translate('serverConfig', 'javaVersionDesc', data['lang']) }}</small>
|
||||||
translate('serverConfig', 'javaVersionDesc', data['lang'])
|
</label>
|
||||||
}}</small> </label>
|
|
||||||
<select class="form-select form-control form-control-lg select-css" id="java_selection"
|
<select class="form-select form-control form-control-lg select-css" id="java_selection"
|
||||||
name="java_selection" form="config_form">
|
name="java_selection" form="config_form">
|
||||||
{% if data['current_java'] %}
|
|
||||||
<option value="{{data['current_java']}}">{{data['current_java']}}</option>
|
|
||||||
<option value="">{{ translate('serverConfig', 'javaNoChange', data['lang'])}}</option>
|
|
||||||
{% else %}
|
|
||||||
<option value="">{{ translate('serverConfig',
|
<option value="">{{ translate('serverConfig',
|
||||||
'javaNoChange', data['lang'])}}</option>
|
'javaNoChange', data['lang'])}}</option>
|
||||||
{% end %}
|
|
||||||
{% for path in data['java_versions'] %}
|
{% for path in data['java_versions'] %}
|
||||||
<option value="{{path}}">{{path}}</option>
|
<option value="{{path}}">{{path}}</option>
|
||||||
{% end %}
|
{% end %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -302,7 +302,7 @@
|
|||||||
"serverExecutable": "Server Executable",
|
"serverExecutable": "Server Executable",
|
||||||
"serverExecutableDesc": "The server's executable file",
|
"serverExecutableDesc": "The server's executable file",
|
||||||
"javaVersion": "Override current Java Version",
|
"javaVersion": "Override current Java Version",
|
||||||
"javaVersionDesc": "If we've been able to find local java installs. (Windows 'Oracle' only)",
|
"javaVersionDesc": "If you're going to override java. Make sure your current java path in 'execution command' is wrapped in quotes (default 'java' variable excluded)",
|
||||||
"javaNoChange": "Do Not Override",
|
"javaNoChange": "Do Not Override",
|
||||||
"serverExecutionCommand": "Server Execution Command",
|
"serverExecutionCommand": "Server Execution Command",
|
||||||
"serverExecutionCommandDesc": "What will be launched in a hidden terminal",
|
"serverExecutionCommandDesc": "What will be launched in a hidden terminal",
|
||||||
@ -534,4 +534,4 @@
|
|||||||
"userSettings": "User Settings",
|
"userSettings": "User Settings",
|
||||||
"uses": "Number of uses allowed (-1==No Limit)"
|
"uses": "Number of uses allowed (-1==No Limit)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user