kirsle / minecraft-control

A telnet wrapper for the Minecraft server that allows it to be remotely controlled.
GNU General Public License v2.0
22 stars 2 forks source link

Add support for bedrock server? #2

Open Blakeinstein opened 5 years ago

Blakeinstein commented 5 years ago

The server software can be found here , the interface is very akin to the java edition.

kirsle commented 5 years ago

If it has a comparable command-line interface (accepts standard-input for commands, outputs logs to standard-output) it might just work with this already, if you swap out the "java -jar" part of the command with the call to the bedrock server exe.

The minecraft-control script can technically wrap around any command-line program that uses standard I/O (I once tested it wrapping a Linux bash shell and it worked! Though bash didn't know it was an interactive terminal, I was able to type commands and get output over the telnet connection to minecraft-control).

Blakeinstein commented 5 years ago

I gave it a shot and it feels like something that can be resolved simply....

[2019-10-16 11:12:51,279] INFO: TCP Admin interface running at 127.0.0.1:2001
[2019-10-16 11:12:51,310] INFO: <<< NO LOG FILE! - setting up server logging...
[2019-10-16 11:12:51,311] INFO: <<< [2019-10-16 11:12:51 INFO] Starting Server
[2019-10-16 11:12:51,311] INFO: <<< [2019-10-16 11:12:51 INFO] Version 1.12.1.1
[2019-10-16 11:12:51,312] INFO: <<< [2019-10-16 11:12:51 INFO] Session ID 3b4c399d-e21f-422a-9860-5333d1469b47
[2019-10-16 11:12:51,312] INFO: <<< [2019-10-16 11:12:51 ERROR] Error reading file: server.properties
[2019-10-16 11:12:51,313] INFO: <<< [2019-10-16 11:12:51 INFO] Level Name: level
[2019-10-16 11:12:51,314] INFO: <<< [2019-10-16 11:12:51 ERROR] Error opening whitelist file: whitelist.json
[2019-10-16 11:12:51,314] INFO: <<< [2019-10-16 11:12:51 INFO] Game mode: 0 Survival
[2019-10-16 11:12:51,314] INFO: <<< [2019-10-16 11:12:51 INFO] Difficulty: 1 EASY
[2019-10-16 11:12:51,376] INFO: <<< [2019-10-16 11:12:51 INFO] Package: com.mojang.minecraft.dedicatedserver
[2019-10-16 11:12:51,376] INFO: <<< Version: 1.12.1.1
[2019-10-16 11:12:51,376] INFO: <<< OS: Linux
[2019-10-16 11:12:51,376] INFO: <<< Server start: 2019-10-16 11:12:51 UTC
[2019-10-16 11:12:51,377] INFO: <<< Dmp timestamp: 2019-10-16 11:12:51 UTC
[2019-10-16 11:12:51,377] INFO: <<< Upload Date: 2019-10-16 11:12:51 UTC
[2019-10-16 11:12:51,377] INFO: <<< Session ID: 3b4c399d-e21f-422a-9860-5333d1469b47
[2019-10-16 11:12:51,377] INFO: <<< Commit hash:
[2019-10-16 11:12:51,377] INFO: <<< Build id: development
[2019-10-16 11:12:51,377] INFO: <<< CrashReporter Key: 6d9c741d-f470-3f4a-8e89-c8a878818f69
[2019-10-16 11:12:51,377] INFO: <<< 
[2019-10-16 11:12:51,378] INFO: <<< Crash
[2019-10-16 11:12:51,378] INFO: <<< [2019-10-16 11:12:51 INFO]  at ResourcePack::getManifest[] const (UnknownFile:?)
[2019-10-16 11:12:51,378] INFO: <<< at DedicatedServer::start[std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&] (UnknownFile:?)
[2019-10-16 11:12:51,378] INFO: <<< at main (UnknownFile:?)
[2019-10-16 11:12:51,378] INFO: <<< at __libc_start_main (UnknownFile:?)
[2019-10-16 11:12:51,379] INFO: <<< at _start (UnknownFile:?)
[2019-10-16 11:12:51,597] INFO: Shutting down everything!
kirsle commented 5 years ago

It looked good up until the bedrock server crashed. Does it run when you run the bedrock server on its own? It looked like something related to resource packs. One guess, it might be related to the working directory path of the server; try putting the minecraft-control in the same directory as the bedrock server and with the world folder nearby too like normal so the working directory should be the same when running minecraft-control as it would be running the bedrock server directly.

Otherwise maybe check on r/minecraft or somewhere about that crash in the bedrock server. The logs from minecraft-control here are just printing out what the bedrock server said.