Package appeng.api.networking.security

Examples of appeng.api.networking.security.ISecurityGrid


            IEnergyGrid eg = g.getCache( IEnergyGrid.class );
            if ( !eg.isNetworkPowered() )
              return false;
          }

          ISecurityGrid sg = g.getCache( ISecurityGrid.class );
          if ( sg.hasPermission( invPlayer.player, perm ) )
            return true;
        }
      }
    }
View Full Code Here


  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();

    ISecurityGrid sg = grid.getCache( ISecurityGrid.class );

    if ( sg == null )
      throw new GridAccessException();

    return sg;
View Full Code Here

  private static boolean checkPlayerPermissions(IGrid grid, int playerID)
  {
    if ( grid == null )
      return false;

    ISecurityGrid gs = grid.getCache( ISecurityGrid.class );

    if ( gs == null )
      return false;

    if ( !gs.isAvailable() )
      return false;

    return !gs.hasPermission( playerID, SecurityPermissions.BUILD );
  }
View Full Code Here

        if ( grid == null )
          return;

        IStorageGrid inv = grid.getCache( IStorageGrid.class );
        IEnergyGrid energy = grid.getCache( IEnergyGrid.class );
        ISecurityGrid security = grid.getCache( ISecurityGrid.class );
        IInventory craftMatrix = cct.getInventoryByName( "crafting" );

        Actionable realForFake = cct.useRealItems() ? Actionable.MODULATE : Actionable.SIMULATE;

        if ( inv != null && recipe != null && security != null )
        {
          InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
          for (int x = 0; x < 9; x++)
          {
            if ( recipe[x] != null && recipe[x].length > 0 )
            {
              ic.setInventorySlotContents( x, recipe[x][0] );
            }
          }

          IRecipe r = Platform.findMatchingRecipe( ic, pmp.worldObj );

          if ( r != null && security.hasPermission( player, SecurityPermissions.EXTRACT ) )
          {
            ItemStack is = r.getCraftingResult( ic );

            if ( is != null )
            {
View Full Code Here

        IGrid gn = n.getGrid();
        if ( gn != security.myGrid )
        {
          int playerID = -1;

          ISecurityGrid sg = gn.getCache( ISecurityGrid.class );
          playerID = sg.getOwner();

          if ( !security.hasPermission( playerID, permission ) )
            return true;
        }
      }
View Full Code Here

TOP

Related Classes of appeng.api.networking.security.ISecurityGrid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.