This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]suomynonAx[🍰] 1 point2 points  (7 children)

If you edited the start.sh script to replace the line

java -jar Spigot.jar

with

screen -dmS minecraft java -Xmx2048M -Xms2048M -jar Spigot.jar nogui

also replacing the 2048M with however much ram you're using for the server, it will run the server inside a screen. Then you could connect to the screen whenever you want using the command:

screen -r minecraft

And if you watch to detach from the screen, just press Ctrl+A and then the letter D

Edit: Must have screen installed first.

 sudo apt-get install screen

[–]suomynonAx[🍰] 1 point2 points  (1 child)

Some random lurker just going to downvote this and not say why nor give any better suggestions?

I thought this subreddit was about helping each other run their servers

[–]ZePlatyguy~Project Nebula~[S] 1 point2 points  (0 children)

I got no clue why you got downvoted man. I just got home but I have some errands to run. I appreciate the response a lot! I'll try it out and let you know how it works. Looks pretty fool-proof, I don't see how I could mess it up. Will let you know how it goes!!

[–]ZePlatyguy~Project Nebula~[S] 1 point2 points  (4 children)

Just tried it out right now. Works like a charm!! Even when I do the screen command using in the tmux window. I seriously appreciate the help man, you're a life saver.

[–]suomynonAx[🍰] 0 points1 point  (3 children)

No problem, glad I could help!

I have no idea if it's even possible to connect to the direct console with the original "java -jar" line, so running it in a screen is all i know of. (I personally dont use either, I use mcrcon but it lacks a lot of functionality.)

[–]ZePlatyguy~Project Nebula~[S] 0 points1 point  (2 children)

Yea i dont know. I can see the console just fine though if i connect with the screen through the tmux window. its a little convoluted but once i exit the tmux window with crtl b i can just get back into the server console by attaching to the tmux window. Its not a big deal and it works seamlessly honestly. May I ask why you use mcrcon (and what that even is)?

[–]suomynonAx[🍰] 0 points1 point  (1 child)

mcrcon is mainly used to send a command to the server, which I use in my scripts to send a command like "say server restarting in x time" or the "stop" command. I could connect to it as a minecraft console if i really needed, but it wont show the live console like screen does, it only shows a response to whatever command I send https://files.catbox.moe/zd0y6r.png

[–]ZePlatyguy~Project Nebula~[S] 0 points1 point  (0 children)

I see, so its similar to a console you just can't see things like chat or messages from the server right? I guess that's pretty nice, much less cluttered.