Examples of IInterdictionMatrix


Examples of calclavia.api.mffs.security.IInterdictionMatrix

  {
    for (IBlockFrequency frequencyTile : FrequencyGrid.instance().get())
    {
      if (((TileEntity) frequencyTile).worldObj == world && frequencyTile instanceof IInterdictionMatrix)
      {
        IInterdictionMatrix interdictionMatrix = (IInterdictionMatrix) frequencyTile;

        if (interdictionMatrix.isActive())
        {
          if (position.distance(new Vector3((TileEntity) interdictionMatrix)) <= interdictionMatrix.getActionRange())
          {
            return interdictionMatrix;
          }
        }
      }
View Full Code Here

Examples of calclavia.api.mffs.security.IInterdictionMatrix

    return hasPermission(world, position, permission, player.username);
  }

  public static boolean hasPermission(World world, Vector3 position, Permission permission, String username)
  {
    IInterdictionMatrix interdictionMatrix = getNearestInterdictionMatrix(world, position);

    if (interdictionMatrix != null)
    {
      return isPermittedByInterdictionMatrix(interdictionMatrix, username, permission);
    }
View Full Code Here

Examples of calclavia.api.mffs.security.IInterdictionMatrix

    return true;
  }

  public static boolean hasPermission(World world, Vector3 position, Action action, EntityPlayer player)
  {
    IInterdictionMatrix interdictionMatrix = getNearestInterdictionMatrix(world, position);

    if (interdictionMatrix != null)
    {
      return MFFSHelper.hasPermission(world, position, interdictionMatrix, action, player);
    }
View Full Code Here

Examples of calclavia.api.mffs.security.IInterdictionMatrix

      Vector3 position = new Vector3(evt.x, evt.y, evt.z);

      /**
       * Check if Interdiction Matrix blocked a specific action.
       */
      IInterdictionMatrix interdictionMatrix = MFFSHelper.getNearestInterdictionMatrix(evt.entityPlayer.worldObj, position);

      if (interdictionMatrix != null)
      {
        int blockID = position.getBlockID(evt.entityPlayer.worldObj);

View Full Code Here

Examples of calclavia.api.mffs.security.IInterdictionMatrix

  }

  @ForgeSubscribe
  public void livingSpawnEvent(LivingSpawnEvent evt)
  {
    IInterdictionMatrix interdictionMatrix = MFFSHelper.getNearestInterdictionMatrix(evt.world, new Vector3(evt.entityLiving));

    if (interdictionMatrix != null && !(evt.entity instanceof EntityPlayer))
    {
      if (interdictionMatrix.getModuleCount(ModularForceFieldSystem.itemModuleAntiSpawn) > 0)
      {
        evt.setResult(Result.DENY);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.