EOSERV Forum > Lounge > Minecraft Server Tool (need help)
Topic is locked.
Page: << 1 >>
Minecraft Server Tool (need help)
Author Message
Post #142768 Minecraft Server Tool (need help)

I am making a server tool in Visual Basic 2010 and I need help with the coding part of it.

I want to use this to study the code so if someone can help me and also add notes in it explaining whats going on with the code that would be great and I will give you the credit for it.

This is for my own use not to release to the public.

this is my current look for it:

12 years, 50 weeks ago
Post #142769 Re: Minecraft Server Tool (need help)

What do you mean by a Minecraft Server Tool?

Let me look up how minecraft handles their data.


Ok, so what you want to do is this.


ServerStartInfo as ProcessStartInfo = new ProcessStartInfo("java", "-Xmx3G -Xms2G -jar " & JarFileLocation & " nogui -nojline")

InputStreamWriter as StreamWriter = ServerProcess.StandardInput


Then you can use 


InputStreamWriter.WriteLine(Command)


to send commands.


InputStreamWriter.WriteLine("Stop")


Heres a command list if needed.



What i would do is create a Server Manager class so you could manage more then one server. You could also easily change without having to modify the whole program.

You can also raise events for when a server disconnects, starts, and several status stuff like a player list included in the class. Then even farther to character information.

---
Andrewbob - I would be on the fucking copter of rofls

Programmer, Web Developer, and Graphics Designer
12 years, 50 weeks ago
Post #142770 Re: Minecraft Server Tool (need help)

Yeah I have NO idea what to do with that stuff except for the sending commands. Would you mind doing the rest of the coding for me? I have the getting file dir part of it done (thats all I can get to work right).

I can send you the files from skype or something

12 years, 50 weeks ago
Post #142771 Re: Minecraft Server Tool (need help)

nah, its pretty self explainitory.


ServerStartInfo as ProcessStartInfo = new ProcessStartInfo("java", "-Xmx3G -Xms2G -jar " & JarFileLocation & " nogui -nojline")

InputStreamWriter as StreamWriter = ServerProcess.StandardInput


Use this when you use something like Connect(JarLocation)

but make sure you can access the ServerStartInfo and the InputStreamWriter outside of that sub. 


Then you can make a sub like SendCommand(Message)

InputStreamWriter.WriteLine(Message)

---
Andrewbob - I would be on the fucking copter of rofls

Programmer, Web Developer, and Graphics Designer
12 years, 50 weeks ago
Post #142772 Re: Minecraft Server Tool (need help)
Wildsurvival posted: (20th May 2012, 04:54 pm)

nah, its pretty self explainitory.


ServerStartInfo as ProcessStartInfo = new ProcessStartInfo("java", "-Xmx3G -Xms2G -jar " & JarFileLocation & " nogui -nojline")

InputStreamWriter as StreamWriter = ServerProcess.StandardInput


Use this when you use something like Connect(JarLocation)

but make sure you can access the ServerStartInfo and the InputStreamWriter outside of that sub. 


Then you can make a sub like SendCommand(Message)

InputStreamWriter.WriteLine(Message)


Whats the ServerProcess in the StreamWriter though? and how do I start the server from the button?
12 years, 50 weeks ago
Post #142773 Re: Minecraft Server Tool (need help)

Whoops i forgot.


ServerProcess as Process = Process.Start(ServerStartInfo)

---
Andrewbob - I would be on the fucking copter of rofls

Programmer, Web Developer, and Graphics Designer
12 years, 50 weeks ago
Post #142774 Re: Minecraft Server Tool (need help)

I really need help with this.


I have the lists working now. But I cant get it to start the server. I also need it to show the console in the textbox but I don't know how to do that. Can anyone help me?

12 years, 50 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Lounge > Minecraft Server Tool (need help)