Add getters for game / protocol version.

This commit is contained in:
md_5 2013-01-24 14:55:21 +11:00
parent 7fec907ab8
commit 2e04640638
2 changed files with 26 additions and 0 deletions

View File

@ -182,4 +182,18 @@ public abstract class ProxyServer
* @return registered plugin channels * @return registered plugin channels
*/ */
public abstract Collection<String> getChannels(); public abstract Collection<String> getChannels();
/**
* Get the Minecraft version supported by this proxy.
*
* @return the supported Minecraft version
*/
public abstract String getGameVersion();
/**
* Get the Minecraft protocol version supported by this proxy.
*
* @return the Minecraft protocol version
*/
public abstract byte getProtocolVersion();
} }

View File

@ -327,4 +327,16 @@ public class BungeeCord extends ProxyServer
byte[] payload = sb.substring(0, sb.length() - 1).getBytes(); byte[] payload = sb.substring(0, sb.length() - 1).getBytes();
return new PacketFAPluginMessage("REGISTER", payload); return new PacketFAPluginMessage("REGISTER", payload);
} }
@Override
public byte getProtocolVersion()
{
return PROTOCOL_VERSION;
}
@Override
public String getGameVersion()
{
return GAME_VERSION;
}
} }