Extracts the control panel tab to its own class, and makes the add server button into a tab button
This commit is contained in:
@ -237,7 +237,7 @@ public class ServerLauncherMenu implements ActionListener {
|
||||
* Asks the user for a delay if checked, and sets the value to the current profile
|
||||
*/
|
||||
private void delay() {
|
||||
String selectedProfile = serverLauncherGUI.getSelectedProfile();
|
||||
String selectedProfile = serverLauncherGUI.getControlPanelTab().getSelectedProfile();
|
||||
if (selectedProfile != null) {
|
||||
Profile profile = controller.getProfileByName(selectedProfile);
|
||||
if (delayStartupCheckBoxMenuItem.isSelected()) {
|
||||
@ -260,7 +260,7 @@ public class ServerLauncherMenu implements ActionListener {
|
||||
* Saves the runInBackground setting to the current profile
|
||||
*/
|
||||
private void background() {
|
||||
String selectedProfile = serverLauncherGUI.getSelectedProfile();
|
||||
String selectedProfile = serverLauncherGUI.getControlPanelTab().getSelectedProfile();
|
||||
if (selectedProfile != null) {
|
||||
Profile profile = controller.getProfileByName(selectedProfile);
|
||||
Objects.requireNonNull(profile).setRunInBackground(runInBackgroundCheckBoxMenuItem.isSelected());
|
||||
@ -273,7 +273,7 @@ public class ServerLauncherMenu implements ActionListener {
|
||||
* Saves the downloadJars setting to the current profile
|
||||
*/
|
||||
private void downloadJars() {
|
||||
String selectedProfile = serverLauncherGUI.getSelectedProfile();
|
||||
String selectedProfile = serverLauncherGUI.getControlPanelTab().getSelectedProfile();
|
||||
if (selectedProfile != null) {
|
||||
controller.setDownloadAllJars(downloadJarsCheckBoxMenuItem.isSelected());
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user