use of net.minecraft.network.NetHandlerPlayServer in project RecurrentComplex by Ivorforce.
the class PacketSaveStructureHandler method processServer.
@Override
public void processServer(PacketSaveStructure message, MessageContext ctx, WorldServer server) {
NetHandlerPlayServer netHandlerPlayServer = ctx.getServerHandler();
EntityPlayerMP player = netHandlerPlayServer.player;
if (RecurrentComplex.checkPerms(player))
return;
RCEntityInfo entityInfo = RCEntityInfo.get(player, null);
GenericStructure genericStructureInfo = message.getStructureInfo();
if (entityInfo != null)
genericStructureInfo.worldDataCompound = entityInfo.getCachedExportStructureBlockDataNBT();
SaveDirectoryData.Result saveDirectoryDataResult = message.getSaveDirectoryDataResult();
String id = message.getStructureID();
ResourceDirectory saveDir = saveDirectoryDataResult.directory;
write(player, genericStructureInfo, id, saveDir, saveDirectoryDataResult.deleteOther, true);
}
Aggregations