Ejemplo n.º 1
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));
  }
Ejemplo n.º 2
0
 @Override
 public void removeGroups(String... groups) {
   for (String group : groups) {
     this.groups.remove(group);
     for (String permission : bungee.getConfigurationAdapter().getPermissions(group)) {
       setPermission(permission, false);
     }
   }
 }
Ejemplo n.º 3
0
 @Override
 public void addGroups(String... groups) {
   for (String group : groups) {
     this.groups.add(group);
     for (String permission : bungee.getConfigurationAdapter().getPermissions(group)) {
       setPermission(permission, true);
     }
   }
 }
Ejemplo n.º 4
0
  public void init() {
    this.entityRewrite = new EntityMap(getPendingConnection().getVersion());

    this.displayName = name;
    try {
      this.tabList =
          getPendingConnection().getListener().getTabList().getDeclaredConstructor().newInstance();
    } catch (ReflectiveOperationException ex) {
      throw new RuntimeException(ex);
    }
    this.tabList.init(this);

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