diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 0e6fb54998..8aa7829c85 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -266,6 +266,7 @@ text.error.unreachable = Server unreachable. text.error.invalidaddress = Invalid address. text.error.timedout = Timed out!\nMake sure the host has port forwarding set up, and that the address is correct! text.error.mismatch = Packet error:\npossible client/server version mismatch.\nMake sure you and the host have the latest version of Mindustry! +text.error.alreadyconnected = Already connected. text.error.any = Unkown network error. text.settings.language = Language diff --git a/core/src/io/anuke/mindustry/net/Net.java b/core/src/io/anuke/mindustry/net/Net.java index 2750d868a8..ea22f63e0b 100644 --- a/core/src/io/anuke/mindustry/net/Net.java +++ b/core/src/io/anuke/mindustry/net/Net.java @@ -69,6 +69,8 @@ public class Net{ error = Bundles.get("text.error.unreachable"); }else if(type.contains("timeout")){ error = Bundles.get("text.error.timeout"); + }else if(error.equals("alreadyconnected")){ + error = Bundles.get("text.error.alreadyconnected"); }else if(!error.isEmpty()){ error = Bundles.get("text.error.any"); } @@ -112,7 +114,7 @@ public class Net{ active = true; server = false; }else{ - throw new IOException("Already connected!"); + throw new IOException("alreadyconnected"); } }catch(IOException e){ showError(e);