1

Closed

Custom Start Command

description

Add a settings tab for Java control. Include:
  • Start command parameters list (and add/remove buttons)
  • Memory allocation numericUpDown
  • Override box for just setting the command.
Fill in with default vals.
Create a new Start method in Server that accepts start command parameter that overrides the default command used for starting Java.

Completed:
  • Custom RAM Config
    Added tab on the settings form to allow changes of the RAM values for starting up the server. There is also a button to reset the values back to default. (1024)
Closed Jan 16, 2014 at 12:01 AM by artdude543

comments

artdude543 wrote Apr 20, 2013 at 9:46 PM

I have submitted a shelve set adding a way of setting own server RAM options. These settings are saved to the "Application" settings, this could be changed to put in the server properties if needed.

EdwardNutting wrote Apr 20, 2013 at 10:40 PM

All looks good to me except that in SettingsForm.cs it looks like you have missed something. The following lines:

if (Message != null)
        {
            if (MessageBox.Show(Message, "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Properties.Settings.Default.Save();
                Settings.Save();
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else
            {
                this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            }
        }
        else
        {
            //Setting the RAM settings on the application by calling the data from the Text Boxes.
            Properties.Settings.Default.Xms = Xms_Data.Value.ToString();
            Properties.Settings.Default.Xmx = Xmx_Data.Value.ToString();
            Properties.Settings.Default.Save();

            Settings.Save();
        }
should in fact be:

if (Message != null)
        {
            if (MessageBox.Show(Message, "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Properties.Settings.Default.Xms = Xms_Data.Value.ToString();
                Properties.Settings.Default.Xmx = Xmx_Data.Value.ToString();
                Properties.Settings.Default.Save();
                Settings.Save();
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else
            {
                this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            }
        }
        else
        {
            //Setting the RAM settings on the application by calling the data from the Text Boxes.
            Properties.Settings.Default.Xms = Xms_Data.Value.ToString();
            Properties.Settings.Default.Xmx = Xmx_Data.Value.ToString();
            Properties.Settings.Default.Save();

            Settings.Save();
        }
You need to set the new values in front of both the possible save points. Please fix this, re-shelve and then I'll commit it. (Also, exclude whatever changes - intentional or not - that have been made to the test server files).

Good work :)
Ed

P.s. Take a look at the official site for this project @ manageminecraft.com - hope you like it :)

artdude543 wrote Apr 20, 2013 at 11:07 PM

There we re-submitted with the changes :)
I was using the Vanilla server for testing the RAM ;) But I've excluded the files

I will have a look at the custom java args, I have a rough idea on what to use for that. Also Im loving the site! Looks awesome and very professional :)

Thanks
Kieron

artdude543 wrote Apr 21, 2013 at 10:39 PM

Don't commit that change please :) I just thought about something I forgot and want to move it to a separate tab page. I will re-shelve when done :)

artdude543 wrote Apr 22, 2013 at 3:18 PM

I have re-submitted a shelve-set, this is the last one for the RAM config :) I did try working out how to add an option for custom arguments. But my ideas did not work that well :/ I will have another go at some point.

wrote Apr 22, 2013 at 8:11 PM

EdwardNutting wrote Apr 22, 2013 at 8:13 PM

I have re-assigned this work item to you as you have now done more of it than anyone else :)

I am extremely busy this week so I will review your code on Saturday and get back to you then.

Thanks very much for your work,
Ed

wrote Apr 23, 2013 at 12:24 PM

wrote Apr 23, 2013 at 12:24 PM

wrote Apr 27, 2013 at 3:49 PM

Associated with changeset 24077: Moved all java related items into a seperate tap page. Added "Reset" button to reset values to "1024". Also improved code a bit more :)

Improved Java RAM settings - shifted it all into server.properties file so that you can allocate different RAM for different servers (given that it is a server dependant property basically).
Added code to limit Max/Min ram allocation.
Completed code for reloading server settings only when necessary.

Added code to detect if running as administrator (see Utils.cs and MainForm.cs) and MainForm respond appropriately i.e. enables/disables web interface.

Added MCSM logo and other ICO files to MainForm, SettingsForm and MapForm.

Added automatic updater (additional project, exe and changes to command line options) along with automatic check for updates at start of program.

wrote Apr 27, 2013 at 4:27 PM

wrote Jul 6, 2013 at 9:51 PM

wrote Jul 6, 2013 at 9:52 PM

wrote Jan 5, 2014 at 12:40 PM

JavaParamaters has now been added and pushed to source. I will be re-fining the system to check for duplicate entries and to help users with adding extra paramaters.

wrote Jan 16, 2014 at 12:01 AM