From 435dcfceba324ec4248e7011dacbba7a25ce5e2f Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 28 Sep 2022 13:39:25 +0200 Subject: [PATCH] Add lx Signed-off-by: Lixfel --- CommonCore | 2 +- src/de/steamwar/bungeecore/BungeeCore.java | 4 +++- src/de/steamwar/bungeecore/Node.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CommonCore b/CommonCore index a249d66..0c68dfd 160000 --- a/CommonCore +++ b/CommonCore @@ -1 +1 @@ -Subproject commit a249d66dcf96bb9aef44b700438c81670ad81de7 +Subproject commit 0c68dfd19dc32a848be2cf399e00bc2863739b57 diff --git a/src/de/steamwar/bungeecore/BungeeCore.java b/src/de/steamwar/bungeecore/BungeeCore.java index df18fb2..4013f34 100644 --- a/src/de/steamwar/bungeecore/BungeeCore.java +++ b/src/de/steamwar/bungeecore/BungeeCore.java @@ -115,7 +115,9 @@ public class BungeeCore extends Plugin { new PingListener(); local = new Node.LocalNode(); - //new Node.RemoteNode("lx"); + if(MAIN_SERVER) { + new Node.RemoteNode("lx"); + } commands.put("/tp", null); commands.put("/bc", null); diff --git a/src/de/steamwar/bungeecore/Node.java b/src/de/steamwar/bungeecore/Node.java index 6c22120..5588530 100644 --- a/src/de/steamwar/bungeecore/Node.java +++ b/src/de/steamwar/bungeecore/Node.java @@ -208,7 +208,7 @@ public abstract class Node { protected void calcLoadLimit() { try { Process process = prepareExecution("cat /proc/stat /proc/meminfo").start(); - if(process.waitFor(1, TimeUnit.SECONDS)) + if(!process.waitFor(1, TimeUnit.SECONDS)) throw new IOException(hostname + " timeout"); try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) { calcLoadLimit(reader, reader);