Fix BungeeCord 1.8 (2nd attempt)

This commit is contained in:
ORelio 2015-01-31 11:21:06 +01:00
parent 391eca102c
commit 2408b51d28
3 changed files with 6 additions and 13 deletions

View file

@ -15,7 +15,7 @@ namespace MinecraftClient
/// Perform the specified action with specified timeout /// Perform the specified action with specified timeout
/// </summary> /// </summary>
/// <param name="action">Action to run</param> /// <param name="action">Action to run</param>
/// <param name="attempts">Maximum timeout in milliseconds</param> /// <param name="timeout">Maximum timeout in milliseconds</param>
/// <returns>True if the action finished whithout timing out</returns> /// <returns>True if the action finished whithout timing out</returns>
public static bool Perform(Action action, int timeout) public static bool Perform(Action action, int timeout)
{ {
@ -26,7 +26,7 @@ namespace MinecraftClient
/// Perform the specified action with specified timeout /// Perform the specified action with specified timeout
/// </summary> /// </summary>
/// <param name="action">Action to run</param> /// <param name="action">Action to run</param>
/// <param name="attempts">Maximum timeout</param> /// <param name="timeout">Maximum timeout</param>
/// <returns>True if the action finished whithout timing out</returns> /// <returns>True if the action finished whithout timing out</returns>
public static bool Perform(Action action, TimeSpan timeout) public static bool Perform(Action action, TimeSpan timeout)
{ {

View file

@ -599,16 +599,9 @@ namespace MinecraftClient.Protocol.Handlers
version = (tmp_name.Length == 2) ? tmp_name[1].Split('"')[0] : tmp_name[2].Split('"')[0]; version = (tmp_name.Length == 2) ? tmp_name[1].Split('"')[0] : tmp_name[2].Split('"')[0];
//Automatic fix for BungeeCord 1.8 not properly reporting protocol version //Automatic fix for BungeeCord 1.8 not properly reporting protocol version
if (protocolversion == 0 && version.Split(' ').Contains("1.8")) if (protocolversion < 47 && version.Split(' ').Contains("1.8"))
protocolversion = ProtocolHandler.MCVer2ProtocolVersion("1.8.0"); protocolversion = ProtocolHandler.MCVer2ProtocolVersion("1.8.0");
if (result.Contains("modinfo\":"))
{
//Server is running Forge (which is not supported)
version = "Forge " + version;
protocolversion = 0;
}
ConsoleIO.WriteLineFormatted("§8Server version : " + version + " (protocol v" + protocolversion + ")."); ConsoleIO.WriteLineFormatted("§8Server version : " + version + " (protocol v" + protocolversion + ").");
return true; return true;
} }

View file

@ -60,7 +60,7 @@ In scripts and remote control, no slash is needed to perform the command.
- respawn : Use this to respawn if you are dead (like clicking "respawn" ingame) - respawn : Use this to respawn if you are dead (like clicking "respawn" ingame)
- log <text> : display some text in the console (useful for scripts) - log <text> : display some text in the console (useful for scripts)
- set varname=value : set a value which can be used as %varname% in further commands - set varname=value : set a value which can be used as %varname% in further commands
- wait <time> : wait <time> : wait X ticks (10 ticks = ~1 second. Only for scripts) - wait <time> : wait X ticks (10 ticks = ~1 second. Only for scripts)
- help : show command help. Tip: Use "/send /help" for server help - help : show command help. Tip: Use "/send /help" for server help
[account] is an account alias defined in accounts file, read more below. [account] is an account alias defined in accounts file, read more below.
@ -179,5 +179,5 @@ You can find more info at:
http://www.minecraftforum.net/topic/1314800-/ http://www.minecraftforum.net/topic/1314800-/
+--------------------+ +--------------------+
| © 2012-2014 ORelio | | © 2012-2015 ORelio |
+--------------------+ +--------------------+