UnknownShadow200 88c5c1dac3 Linux: Fix rare case where GUI would crash at startup (mostly when using standalone builds compiled with mkbundle)
This happened due to two factors:

1) the standalone build would show a message box warning because it couldn't change the current/working directory
2) the gui schedules InitServerTask to run on the background thread. This in turn will eventually call Server.Start on the background thread, which in turn will call Logger.Log(..) which in turn calls back to Window.LogMessage

Note that the UI can only be updated from the main/UI thread. Normally this wouldn't cause any issues, because LogMessage checked whether 'InvokeRequired' returned true or not - if it did, then LogMessage scheduled the message to be logged later on the main/UI thread by using BeginInvoke.

However, it was rarely possible that due to thread scheduling, the call to LogMessage from the background thread would be run *before* the main window control handle had finished being created.
And unexpectedly, 'InvokeRequired' would return *false* if the main window handle hadn't been created yet - and hence the background thread would attempt to directly update UI controls with catastrophic consequences. Sometimes this worked, but other times it would cause the app to SIGABRT and crash in X11 somewhere, usually in X11Keyboard:XCreateFontSet

So to workaround this I made the following changes:
1) failing to set working/current directory doesn't show a warning message box popup anymore
2) LogMessage doesn't check 'InvokeRequired' anymore and just always calls BeginInvoke to schedule the message logging on the main/UI thread

So in the most of the rare cases when this issue even happened, it shouldn't occur anymore now. However, the underlying issue still isn't completely solved.. if you change the code to show a message box before the main window, you'll still rarely end up with the main window being a black box with X11
2022-06-06 23:11:24 +10:00
2022-04-19 23:03:07 +10:00
2022-04-19 23:03:07 +10:00

MCGalaxy is a fully featured and customisable ClassiCube Server Software based on MCForge/MCLawl.

Setup

Download the latest MCGalaxy release from here

  • Windows: You need to install .NET framework 4.0. Windows 8/10/11 already have this included.
  • macOS: You need to install the Mono framework.
  • Linux: You need to install the Mono framework. (or just apt install mono-complete if on Ubuntu)

Run MCGalaxy.exe for a graphical interface, or run MCGalaxyCLI.exe for command line only.

Joining your server

Run MCGalaxy.exe or MCGalaxyCLI.exe firstly. You'll see something like: opt3

If you are signed in to classicube.net, you can copy this URL straight into your web browser and start playing.

Joining from the ClassiCube client

Click Direct connect at the main menu. opt1

Type your username into Username, 127.0.0.1:25565 into IP:Port, and leave Mppass blank. Then click Connect. opt2

Make yourself owner

After joining, you will want to rank yourself owner so you can use all commands.

Type /rank [your account] owner into the bottom text box, then press Enter.

opt4

Letting others join your server

LAN players

You need to find out your LAN/local IP address.

  • Windows: Type ipconfig into Command Prompt. Look for IPv4 address in the output
  • macOS: Type ipconfig getifaddr en0 or ipconfig getifaddr en1 into Terminal
  • Linux: Type hostname -I into Terminal. Lan IP is usually the first address in the output

Joining from a web browser

Enter the server URL followed by ?ip=[lan ip] into the web browser.
(e.g. http://www.classicube.net/server/play/d1362e7fee1a54365514712d007c8799?ip=192.168.1.30)

Joining from the ClassiCube client

  • Click Direct connect at the main menu
  • Type your username into Username textbox
  • Type [lan ip]:25565 into IP:Port textbox (e.g. 192.168.1.30:25565)
  • Click Connect

Across the internet

You usually need to port forward in your router before other players can join.

Joining from a web browser

Enter the server URL into the web browser

Joining from the ClassiCube client

  • Click Sign in
  • Type/paste the hash (e.g. d1362e7fee1a54365514712d007c8799) into the classicube.net/server/play text box
  • Click Connect

Show on classicube.net server list

Click Settings in the MCGalaxy window, then tick the Public checkbox. Then click Save.

This makes your server appear in the server list on classicube.net and in the ClassiCube client.

Compiling

With an IDE:

  • Visual Studio : Open MCGalaxy.sln, click Build in the menubar, then click Build Solution. (Or press F6)
  • SharpDevelop: Open MCGalaxy.sln, click Build in the menubar, then click Build Solution. (Or press F8)

Command line:

  • For Windows: Run MSBuild command prompt for VS, then type msbuild MCGalaxy.sln into command prompt
  • Modern mono: Type msbuild MCGalaxy.sln into Terminal
  • Older mono: Type xbuild MCGalaxy.sln into Terminal

Copyright/License

See LICENSE for MCGalaxy license, and license.txt for code used from other software.

Docker support

Some unofficial dockerfiles for running MCGalaxy in Docker:

Documentation

Description
A Minecraft Classic / ClassiCube server software
Readme SSPL-1.0 92 MiB
Languages
C# 99.9%
Shell 0.1%