aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmcwrapper6
1 files changed, 5 insertions, 1 deletions
diff --git a/mcwrapper b/mcwrapper
index ddf1d8d..9e137ae 100755
--- a/mcwrapper
+++ b/mcwrapper
@@ -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()