Package calclavia.api.mffs.security

Examples of calclavia.api.mffs.security.IBiometricIdentifier


  {
    if (entityLiving instanceof EntityPlayer)
    {
      EntityPlayer player = (EntityPlayer) entityLiving;

      IBiometricIdentifier biometricIdentifier = interdictionMatrix.getBiometricIdentifier();

      if (biometricIdentifier != null && biometricIdentifier.isAccessGranted(player.username, Permission.DEFENSE_STATION_CONFISCATION))
      {
        return false;
      }
    }

    Set<ItemStack> controlledStacks = interdictionMatrix.getFilteredItems();

    int confiscationCount = 0;
    IInventory inventory = null;

    if (entityLiving instanceof EntityPlayer)
    {
      IBiometricIdentifier biometricIdentifier = interdictionMatrix.getBiometricIdentifier();

      if (biometricIdentifier != null && biometricIdentifier.isAccessGranted(((EntityPlayer) entityLiving).username, Permission.BYPASS_INTERDICTION_MATRIX))
      {
        return false;
      }

      EntityPlayer player = (EntityPlayer) entityLiving;
View Full Code Here


   */
  public void scan()
  {
    try
    {
      IBiometricIdentifier biometricIdentifier = this.getBiometricIdentifier();

      AxisAlignedBB emptyBounds = AxisAlignedBB.getBoundingBox(this.xCoord, this.yCoord, this.zCoord, this.xCoord + 1, this.yCoord + 1, this.zCoord + 1);

      List<EntityLivingBase> warningList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getWarningRange(), getWarningRange(), getWarningRange()));
      List<EntityLivingBase> actionList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getActionRange(), getActionRange(), getActionRange()));

      for (EntityLivingBase entityLiving : warningList)
      {
        if (entityLiving instanceof EntityPlayer && !actionList.contains(entityLiving))
        {
          EntityPlayer player = (EntityPlayer) entityLiving;

          boolean isGranted = false;

          if (biometricIdentifier != null && biometricIdentifier.isAccessGranted(player.username, Permission.BYPASS_INTERDICTION_MATRIX))
          {
            isGranted = true;
          }

          if (!isGranted && this.worldObj.rand.nextInt(3) == 0 && getModuleCount(ModularForceFieldSystem.itemModuleSilence) <= 0)
View Full Code Here

     */
    if (entityLiving instanceof EntityPlayer)
    {
      EntityPlayer player = (EntityPlayer) entityLiving;

      IBiometricIdentifier biometricIdentifier = this.getBiometricIdentifier();

      if (biometricIdentifier != null && biometricIdentifier.isAccessGranted(player.username, Permission.BYPASS_INTERDICTION_MATRIX))
      {
        return;
      }

      if (!Settings.INTERACT_CREATIVE && player.capabilities.isCreativeMode)
View Full Code Here

        {
          EntityPlayer entityPlayer = (EntityPlayer) entity;

          if (entityPlayer.isSneaking())
          {
            IBiometricIdentifier biometricIdentifier = projector.getBiometricIdentifier();

            if (entityPlayer.capabilities.isCreativeMode)
            {
              continue;
            }
            else if (biometricIdentifier != null)
            {
              if (biometricIdentifier.isAccessGranted(entityPlayer.username, Permission.FORCE_FIELD_WARP))
              {
                continue;
              }
            }
          }
View Full Code Here

  @Override
  public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
  {
    if (this.getProjector(world, x, y, z) != null)
    {
      IBiometricIdentifier biometricIdentifier = this.getProjector(world, x, y, z).getBiometricIdentifier();

      List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 0.9, z + 1));

      for (EntityPlayer entityPlayer : entities)
      {
        if (entityPlayer != null)
        {
          if (entityPlayer.isSneaking())
          {
            if (entityPlayer.capabilities.isCreativeMode)
            {
              return null;
            }
            else if (biometricIdentifier != null)
            {
              if (biometricIdentifier.isAccessGranted(entityPlayer.username, Permission.FORCE_FIELD_WARP))
              {
                return null;
              }
            }
          }
View Full Code Here

          {
            return;
          }
        }

        IBiometricIdentifier biometricIdentifier = this.getProjector(world, x, y, z).getBiometricIdentifier();

        if (new Vector3(entity).distance(new Vector3(x, y, z).add(0.4)) < 0.5)
        {
          if (entity instanceof EntityLiving && !world.isRemote)
          {
            ((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 4 * 20, 3));
            ((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 1));

            boolean hasPermission = false;

            List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 0.9, z + 1));

            for (EntityPlayer entityPlayer : entities)
            {
              if (entityPlayer != null)
              {
                if (entityPlayer.isSneaking())
                {
                  if (entityPlayer.capabilities.isCreativeMode)
                  {
                    hasPermission = true;
                    break;

                  }
                  else if (biometricIdentifier != null)
                  {
                    if (biometricIdentifier.isAccessGranted(entityPlayer.username, Permission.FORCE_FIELD_WARP))
                    {
                      hasPermission = true;
                    }
                  }
                }
View Full Code Here

TOP

Related Classes of calclavia.api.mffs.security.IBiometricIdentifier

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.