use of logisticspipes.security.SecuritySettings in project LogisticsPipes by RS485.
the class LogisticsSecurityTileEntity method getSecuritySettingsForPlayer.
public SecuritySettings getSecuritySettingsForPlayer(EntityPlayer entityplayer, boolean usePower) {
if (LogisticsSecurityTileEntity.byPassed.contains(entityplayer)) {
return LogisticsSecurityTileEntity.allowAll;
}
if (usePower && !useEnergy(10)) {
entityplayer.sendMessage(new TextComponentTranslation("lp.misc.noenergy"));
return new SecuritySettings("No Energy");
}
SecuritySettings setting = settingsList.get(entityplayer.getDisplayNameString());
// TODO Change to GameProfile based Authentication
if (setting == null) {
setting = new SecuritySettings(entityplayer.getDisplayNameString());
settingsList.put(entityplayer.getDisplayNameString(), setting);
}
return setting;
}
use of logisticspipes.security.SecuritySettings in project LogisticsPipes by RS485.
the class SecurityStationOpenPlayer method handleClientSide.
@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);
}
}
Aggregations