Package logisticspipes.security

Examples of logisticspipes.security.SecuritySettings


  }
 
  @SideOnly(Side.CLIENT)
  private void handleClientSide(EntityPlayer player) {
    if(FMLClientHandler.instance().getClient().currentScreen instanceof GuiSecurityStation) {
      SecuritySettings setting = new SecuritySettings(null);
      setting.readFromNBT(getTag());
      ((GuiSecurityStation) FMLClientHandler.instance().getClient().currentScreen).handlePlayerSecurityOpen(setting);
    }
  }
View Full Code Here


    NBTTagList list = par1nbtTagCompound.getTagList("settings", 10);
    while(list.tagCount() > 0) {
      NBTBase base = list.removeTag(0);
      String name = ((NBTTagCompound)base).getString("name");
      NBTTagCompound value = ((NBTTagCompound)base).getCompoundTag("content");
      SecuritySettings settings = new SecuritySettings(name);
      settings.readFromNBT(value);
      settingsList.put(name, settings);
    }
    excludedCC.clear();
    list = par1nbtTagCompound.getTagList("excludedCC", 3);
    while(list.tagCount() > 0) {
View Full Code Here

      break;
    }
  }

  public void handleOpenSecurityPlayer(EntityPlayer player, String string) {
    SecuritySettings setting = settingsList.get(string);
    if(setting == null && string != null && !string.isEmpty()) {
      setting = new SecuritySettings(string);
      settingsList.put(string, setting);
    }
    NBTTagCompound nbt = new NBTTagCompound();
    setting.writeToNBT(nbt);
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(SecurityStationOpenPlayer.class).setTag(nbt), player);
  }
View Full Code Here

    setting.writeToNBT(nbt);
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(SecurityStationOpenPlayer.class).setTag(nbt), player);
  }

  public void saveNewSecuritySettings(NBTTagCompound tag) {
    SecuritySettings setting = settingsList.get(tag.getString("name"));
    if(setting == null) {
      setting = new SecuritySettings(tag.getString("name"));
      settingsList.put(tag.getString("name"), setting);
    }
    setting.readFromNBT(tag);
  }
View Full Code Here

  public SecuritySettings getSecuritySettingsForPlayer(EntityPlayer entityplayer, boolean usePower) {
    if(byPassed.contains(entityplayer)) return allowAll;
    if(usePower && !useEnergy(10)) {
      entityplayer.addChatComponentMessage(new ChatComponentTranslation("lp.misc.noenergy"));
      return new SecuritySettings("No Energy");
    }
    SecuritySettings setting = settingsList.get(entityplayer.getDisplayName());
    //TODO Change to GameProfile based Authentication
    if(setting == null) {
      setting = new SecuritySettings(entityplayer.getDisplayName());
      settingsList.put(entityplayer.getDisplayName(), setting);
    }
    return setting;
  }
View Full Code Here

  @CCCommand(description="Returns the Internal LogisticsModule for this pipe")
  public abstract LogisticsModule getLogisticsModule();
 
  @Override
  public final boolean blockActivated(EntityPlayer entityplayer) {
    SecuritySettings settings = null;
    if(MainProxy.isServer(entityplayer.worldObj)) {
      LogisticsSecurityTileEntity station = SimpleServiceLocator.securityStationManager.getStation(getUpgradeManager().getSecurityID());
      if(station != null) {
        settings = station.getSecuritySettingsForPlayer(entityplayer, true);
      }
View Full Code Here

TOP

Related Classes of logisticspipes.security.SecuritySettings

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.