Пример #1
0
  @Override
  public Map<String, String> getModList() {
    if (forgeClientHandler.getClientModList() == null) {
      // Return an empty map, rather than a null, if the client hasn't got any mods,
      // or is yet to complete a handshake.
      return ImmutableMap.of();
    }

    return ImmutableMap.copyOf(forgeClientHandler.getClientModList());
  }
Пример #2
0
  public void init() {
    this.entityRewrite = EntityMap.getEntityMap(getPendingConnection().getVersion());

    this.displayName = name;

    // Blame Mojang for this one
    /*switch ( getPendingConnection().getListener().getTabListType() )
    {
    case "GLOBAL":
    tabListHandler = new Global( this );
    break;
    case "SERVER":
    tabListHandler = new ServerUnique( this );
    break;
    default:
    tabListHandler = new GlobalPing( this );
    break;
    }*/
    tabListHandler = new ServerUnique(this);

    Collection<String> g = bungee.getConfigurationAdapter().getGroups(name);
    g.addAll(bungee.getConfigurationAdapter().getGroups(getUniqueId().toString()));
    for (String s : g) {
      addGroups(s);
    }

    forgeClientHandler = new ForgeClientHandler(this);

    // Set whether the connection has a 1.8 FML marker in the handshake.
    forgeClientHandler.setFmlTokenInHandshake(
        this.getPendingConnection()
            .getExtraDataInHandshake()
            .contains(ForgeConstants.FML_HANDSHAKE_TOKEN));
  }
Пример #3
0
 @Override
 public boolean isForgeUser() {
   return forgeClientHandler.isForgeUser();
 }
Пример #4
0
 @Override
 public void sendData(String channel, byte[] data) {
   unsafe().sendPacket(new PluginMessage(channel, data, forgeClientHandler.isForgeUser()));
 }