diff options
Diffstat (limited to 'mcwrapper')
-rwxr-xr-x | mcwrapper | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -190,6 +190,7 @@ class MCServer: if self.running(): self.prc.stdin.write(bytes("/stop\n", sys.getdefaultencoding())) self.prc.stdin.flush() + self.__autoshutdown_disable__() def running(self): "Returns True if mc server is running. Othervise False." if self.status != 0: @@ -198,10 +199,13 @@ class MCServer: return False def write_to_terminal(self, text): "Write to server terminal. If server not running it does nothing" - if self.running(): + if self.statis == 2: info(self.identifier + ": Input: " + ln, 1) self.prc.write(bytes(line, sys.getdefaultencoding())) self.prc.flush() + return True + else: + return False def join(self): "Join execution untill server exits." self.outpuThread.join() |