Fix Server Launch

This commit is contained in:
TheBrokenRail 2020-10-30 13:27:50 -04:00
parent 48d796fa46
commit 151e404aab
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
FROM thebrokenrail/minecraft-pi:client
ENV MCPI_SERVER=1
ENV MCPI_MODE=server
RUN apt-get install -y xvfb

View File

@ -156,7 +156,9 @@ int extra_has_feature(const char *name) {
int extra_get_mode() {
char *mode = getenv("MCPI_MODE");
if (strcmp("virgl", mode) == 0) {
if (mode == NULL) {
ERR("%s", "MCPI Mode Not Specified");
} else if (strcmp("virgl", mode) == 0) {
return 0;
} else if (strcmp("native", mode) == 0) {
return 1;