Add API for getting whether the user is a Forge user.

For Minecraft+Forge 1.8 we can detect whether the user is a Forge user before we get the mod list, due to the changes to the initial (not FML|HS) handshake that are now made (which is for vanilla client support). Bungee can exploit this to detect FML clients from the off, but it still does not tell us what the mod list is. Thus, creating this API method for users who simply need to know whether the user is connected via FML is no longer a duplication of the getModList api method.
This commit is contained in:
Daniel Naylor
2014-12-21 14:32:45 +00:00
committed by md_5
parent 4809f1f80a
commit 28496e0471
2 changed files with 23 additions and 2 deletions

View File

@@ -519,6 +519,12 @@ public final class UserConnection implements ProxiedPlayer
return ( locale == null && settings != null ) ? locale = Locale.forLanguageTag( settings.getLocale().replaceAll( "_", "-" ) ) : locale;
}
@Override
public boolean isForgeUser()
{
return forgeClientHandler.isForgeUser();
}
@Override
public Map<String, String> getModList()
{